vim: Better snippets (and split completion file)
This commit is contained in:
parent
d325eb2d27
commit
6e4130fd26
4 changed files with 92 additions and 35 deletions
|
@ -1,5 +1,6 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
# UPST
|
||||
vim-shot-f = pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "vim-shot-f";
|
||||
version = "2016-02-05";
|
||||
|
@ -78,33 +79,6 @@ in
|
|||
# Tabline
|
||||
barbar.enable = true;
|
||||
|
||||
# Completion
|
||||
nvim-cmp = {
|
||||
enable = true;
|
||||
mapping = { # Proposed example, since there's no default
|
||||
"<C-Space>" = "cmp.mapping.complete()";
|
||||
"<C-d>" = "cmp.mapping.scroll_docs(-4)";
|
||||
"<C-e>" = "cmp.mapping.close()";
|
||||
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
"<S-Tab>" = {
|
||||
action = "cmp.mapping.select_prev_item()";
|
||||
modes = [ "i" "s" ];
|
||||
};
|
||||
"<Tab>" = {
|
||||
action = "cmp.mapping.select_next_item()";
|
||||
modes = [ "i" "s" ];
|
||||
};
|
||||
};
|
||||
sources = [ # Respective plugins will get installed automatically
|
||||
{ name = "buffer"; }
|
||||
{ name = "calc"; }
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "path"; }
|
||||
{ name = "vsnip"; }
|
||||
];
|
||||
};
|
||||
lspkind.enable = true; # Add icons to LSP completions
|
||||
|
||||
# Go to whatever
|
||||
telescope = {
|
||||
|
@ -254,12 +228,6 @@ in
|
|||
# Language server
|
||||
lsp_signature-nvim # Show argument definition when typing a function
|
||||
|
||||
# Snippets
|
||||
vim-vsnip
|
||||
vim-vsnip-integ
|
||||
friendly-snippets
|
||||
# TODO luasnip seems to be in Lua and more integrated with Nix.
|
||||
|
||||
# Git
|
||||
fugitive-gitlab-vim # Open files in GitLab
|
||||
# TODO Connect it!
|
||||
|
@ -291,7 +259,6 @@ in
|
|||
|
||||
" vim-gutentags
|
||||
let g:gutentags_cache_dir = expand('~/.cache/nvim/tags')
|
||||
|
||||
'' + lib.optionalString config.frogeye.extra ''
|
||||
" languagetool
|
||||
let g:languagetool_cmd = "${pkgs.languagetool}/bin/languagetool-commandline"
|
||||
|
@ -368,4 +335,8 @@ in
|
|||
];
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
./completion.nix
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue