Skip to content

Instantly share code, notes, and snippets.

Nimble features

Nimble feature(variant) represents grouping of dependencies/compile flags that are propagated to the consumers of a particular package. The main goal is to isolate the dependencies that may or may not be required by upstream packages and allow upstream packages to choose what set of functionality is enabled for their needs.

Syntax for the nimble file:

Create a menu(breakfast, lunch, dinner) for 1 month for 3 people for someone who
enjoys cooking in instant pot and air fryer. We cook in the oven and using
frying pan from time to time too. The meals should be made by ingredients
available in Bulgaria. Include the average prices that you have for the region
of Sofia, Bulgaria. If you don't have such, you may use whatever feels more
appropriate. Include the ingredients after each meal.
When creating the menu, consider:
1. My wife does not eat diary
2. My kid is 3 years old
git clone https://github.com/yyoncho/langserver
cd langserver
nimble build --silent
export PATH=$PATH:$(pwd)
echo $PATH
cd ..
Processor
11th Generation Intel® Core™ i7-11850H vPro® (24 MB Cache, 8 Core, 16 Threads, 2.50 GHz to 4.80 GHz, 45 W)
Operating System
Ubuntu® Linux® 20.04 LTS, 64-bit
Video Card
Integrated:
Intel® UHD Graphics
[Nimbus env] ➜ beacon_chain git:(stable) /home/yyoncho/Sources/nim/Nim-2/nimsuggest/nimsuggest nimbus_beacon_node.nim
Hint: used config file '/home/yyoncho/Sources/nim/nimbus-eth2/vendor/nimbus-build-system/vendor/Nim/config/nim.cfg' [Conf]
Hint: used config file '/home/yyoncho/Sources/nim/nimbus-eth2/vendor/nimbus-build-system/vendor/Nim/config/config.nims' [Conf]
Hint: used config file '/home/yyoncho/Sources/nim/nimbus-eth2/config.nims' [Conf]
Hint: used config file '/home/yyoncho/Sources/nim/nimbus-eth2/beacon_chain/nim.cfg' [Conf]
Hint: used config file '/home/yyoncho/Sources/nim/nimbus-eth2/beacon_chain/nimbus_beacon_node.nim.cfg' [Conf]
/home/yyoncho/Sources/nim/Nim-2/nimsuggest/nimsuggest.nim(651) nimsuggest
/home/yyoncho/Sources/nim/Nim-2/nimsuggest/nimsuggest.nim(648) handleCmdLine
/home/yyoncho/Sources/nim/nimbus-eth2/vendor/nimbus-build-system/vendor/Nim/compiler/cmdlinehelper.nim(77) loadConfigsAndRunMainCommand
/home/yyoncho/Sources/nim/Nim-2/nimsuggest/nimsuggest.nim(536) mainCommand
int main(void) {
int pfd[2]; /* Pipe’s file descriptors. */
pid_t child_pid; /* Child’s process id. */
/* Set up pipe. */
if (pipe(pfd) == -1) {
fprintf(stderr, "Call to pipe failed.\n");
exit(1);
}
/* FILE *out = fdopen(pfd[1], "a"); */
(defun lsp--client-capabilities (&optional custom-capabilities)
"Return the client capabilities appending CUSTOM-CAPABILITIES."
(append
`((workspace . ((workspaceEdit . ((documentChanges . t)
(resourceOperations . ["create" "rename" "delete"])))
(applyEdit . t)
(symbol . ((symbolKind . ((valueSet . ,(apply 'vector (number-sequence 1 26)))))))
(executeCommand . ((dynamicRegistration . :json-false)))
,@(when lsp-enable-file-watchers '((didChangeWatchedFiles . ((dynamicRegistration . t)))))
(workspaceFolders . t)
(setq my/message
'(:jsonrpc "2.0" :method "initialize" :params
(:processId nil :rootPath "/home/yyoncho/Sources/CPP/testCPP" :clientInfo
(:name "emacs" :version "GNU Emacs 28.0.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0)\n of 2020-12-24")
:rootUri "file:///home/yyoncho/Sources/CPP/testCPP" :capabilities
((workspace
(workspaceEdit
(documentChanges . t)
(resourceOperations .
["create" "rename" "delete"]))
======================================================================
1 -> (company-capf prefix)
1 <- company-capf: ("n" . t)
======================================================================
1 -> (company-capf require-match)
1 <- company-capf: never
======================================================================
1 -> (company-capf candidates "n")
1 <- company-capf: (#("new-cap" 0 1 (lsp-completion-item #3=#s(hash-table size 10 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("kind" 10 "label" "new-cap" "insertText" "\"new-cap\"" "insertTextFormat" 2 "filterText" #("\"new-cap\"" 0 9 (match-data (0 2 0 1 1 2))) "documentation" "Require constructor function names to begin with a capital letter" "textEdit" #s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("range" #s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("start" #s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("line" 24 "character" 1)) "end" #s(hash-
Here it is the log:
```
[Trace - 06:18:06 PM] Sending notification 'textDocument/didChange'.
Params: {
"textDocument": {
"uri": "file:///home/yyoncho/Sources/my-app/.eslintrc.json",
"version": 49
},
"contentChanges": [