Update COC settings
- Add ccls
- Update coc-spell-checker
- Update theme
diff --git a/modules/neovim/coc/default.nix b/modules/neovim/coc/default.nix
index 5dcf785..72ef4d0 100644
--- a/modules/neovim/coc/default.nix
+++ b/modules/neovim/coc/default.nix
@@ -2,6 +2,7 @@
, system
, lib
, nixpkgs-minion
+, nixpkgs-coc-spellchecker
, home
, utils
, omnisharp-language-server
@@ -78,6 +79,12 @@
};
};
};
+ ccls = {
+ command = "${pkgs.ccls}/bin/ccls";
+ filetypes = [ "c" "cc" "cpp" "c++" "objc" "objcpp" "C" ];
+ rootPatterns = [ ".ccls" "compile_commands.json" ".git/" ".vim/" ];
+ initializationOptions.cache.directory = "/tmp/ccls";
+ };
};
"snippets.extends" = {
markdown = [ "tex" ];
@@ -101,7 +108,7 @@
coc-java
# Spellchecker
- nixpkgs-minion.legacyPackages.${system}.vimPlugins.coc-spell-checker
+ nixpkgs-coc-spellchecker.legacyPackages.${system}.vimPlugins.coc-spell-checker
nixpkgs-minion.legacyPackages.${system}.vimPlugins.coc-omnisharp
# File explorer
@@ -139,6 +146,8 @@
black
rope
]))
+ libclang
+ ccls
];
};
home.file =
diff --git a/modules/neovim/coc/keybinds.vim b/modules/neovim/coc/keybinds.vim
index 0f31a9f..d45dce5 100644
--- a/modules/neovim/coc/keybinds.vim
+++ b/modules/neovim/coc/keybinds.vim
@@ -6,6 +6,10 @@
nmap <silent> <Leader>fc <Plug>(coc-codeaction-cursor)
nmap <silent> <Leader>fr <Plug>(coc-rename)
nmap <silent> <Leader>fi <Plug>(coc-fix-current)
+nmap <silent> <Leader>gd <Plug>(coc-definition)
+nmap <silent> <Leader>gt <Plug>(coc-type-definition)
+nmap <silent> <Leader>gi <Plug>(coc-implementation)
+nmap <silent> <Leader>gr <Plug>(coc-references)
nmap <Leader>fe <Cmd>CocCommand explorer<CR>
let g:UltiSnipsExpandTrigger="<NUL>"
diff --git a/modules/neovim/coc/snippets/markdown.snippets b/modules/neovim/coc/snippets/markdown.snippets
index ce82400..f30c2c7 100644
--- a/modules/neovim/coc/snippets/markdown.snippets
+++ b/modules/neovim/coc/snippets/markdown.snippets
@@ -81,6 +81,10 @@
X\sim N(${1:mean}, ${2:variance})${0}
endsnippet
+snippet poissondistribution "A poisson distribution" i
+X\sim \text{Po}(${1:\lambda})${0}
+endsnippet
+
snippet 2x2matrix "A 2 by 2 matrix" i
\begin{bmatrix} ${1} & ${2} \\\\ ${3} & ${4} \end{bmatrix}${0}
endsnippet
@@ -104,3 +108,15 @@
snippet ne "Not equal to" i
\not =
endsnippet
+
+snippet arsinh "Arsinh" i
+\text{arsinh}
+endsnippet
+
+snippet artanh "Artanh" i
+\text{artanh}
+endsnippet
+
+snippet arcosh "Arcosh" i
+\text{arcosh}
+endsnippet
diff --git a/modules/neovim/coc/theme.vim b/modules/neovim/coc/theme.vim
index d7558f1..7caa2a2 100644
--- a/modules/neovim/coc/theme.vim
+++ b/modules/neovim/coc/theme.vim
@@ -3,10 +3,10 @@
call g:Highlight("DiagnosticWarn", g:yellow, g:transparent)
call g:Highlight("DiagnosticError", g:red, g:transparent)
-highlight DiagnosticUnderlineError guisp=#e06c75
-highlight DiagnosticUnderlineInfo guisp=#61afef
-highlight DiagnosticUnderlineHint guisp=#61afef
-highlight DiagnosticUnderlineWarn guisp=#e5c07b
+au ColorScheme onehalfdark highlight DiagnosticUnderlineError guisp=#e06c75
+au ColorScheme onehalfdark highlight DiagnosticUnderlineInfo guisp=#61afef
+au ColorScheme onehalfdark highlight DiagnosticUnderlineHint guisp=#61afef
+au ColorScheme onehalfdark highlight DiagnosticUnderlineWarn guisp=#e5c07b
call g:Highlight("CocPumMenu", g:transparent, g:black)
call g:Highlight("CocFloating", g:transparent, g:black)