summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-05-03 16:53:06 +0200
committerAlex Auvolat <alex@adnab.me>2023-05-03 16:53:06 +0200
commit0f80c99739f06a39588bcde452d36ba58d986bc3 (patch)
tree01ff2df0ae4e7ef9ba5d3319f0ed8f4cbe97dcb7
parent6dba53af843594854d51b71107b16305258b6ee8 (diff)
downloaduser-config-0f80c99739f06a39588bcde452d36ba58d986bc3.tar.gz
user-config-0f80c99739f06a39588bcde452d36ba58d986bc3.zip
Add rust-analyzer coc vim plugin
-rw-r--r--nixpkgs/common.nix13
-rw-r--r--vim/vimrc3
2 files changed, 15 insertions, 1 deletions
diff --git a/nixpkgs/common.nix b/nixpkgs/common.nix
index f3cc2a9..1f98b2e 100644
--- a/nixpkgs/common.nix
+++ b/nixpkgs/common.nix
@@ -1,5 +1,8 @@
{ pkgs, ... }: {
home.username = "lx";
+ home.packages = with pkgs; [
+ nodejs-slim
+ ];
programs.direnv = {
enable = true;
@@ -22,7 +25,15 @@
programs.vim = {
enable = true;
extraConfig = (builtins.readFile ../vim/vimrc);
- plugins = with pkgs.vimPlugins; [ vim-nix fzf-vim nerdtree vim-go ];
+ plugins = with pkgs.vimPlugins; [
+ vim-nix
+ fzf-vim
+ nerdtree
+ vim-go
+ coc-nvim
+ coc-json
+ coc-rust-analyzer
+ ];
};
programs.git.enable = true;
diff --git a/vim/vimrc b/vim/vimrc
index 8ea1315..743e081 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -16,6 +16,9 @@ map ; <ESC>:FZF<CR>
nnoremap <leader>l :bnext<CR>
nnoremap <leader>k :bprev<CR>
+" S-D for prev/next Coc diagnostic
+nnoremap <leader>d <Plug>(coc-diagnostic-next-error)
+nnoremap <leader>s <Plug>(coc-diagnostic-prev-error)
" Append modeline after last line in buffer.