extensive playing with LSP setup
This commit is contained in:
parent
f8806fff98
commit
864e126424
2 changed files with 179 additions and 81 deletions
169
nix/home.nix
169
nix/home.nix
|
|
@ -48,7 +48,8 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
in {
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
git-plan
|
||||
htop
|
||||
|
|
@ -148,103 +149,109 @@ in {
|
|||
|
||||
vim-commentary
|
||||
vim-airline
|
||||
{ plugin = rainbow;
|
||||
config = ''
|
||||
let g:rainbow_conf = {
|
||||
\ 'guifgs': ['RoyalBlue3', 'SeaGreen3', 'DarkOrchid3', 'firebrick3', 'RoyalBlue3', 'SeaGreen3', 'DarkOrchid3', 'firebrick3', 'RoyalBlue3', 'DarkOrchid3', 'firebrick3', 'RoyalBlue3', 'SeaGreen3', 'DarkOrchid3', 'firebrick3'],
|
||||
\ 'ctermfgs': ['red', 'brown', 'blue', 'gray', 'green', 'magenta', 'cyan', 'darkred', 'brown', 'darkblue', 'gray', 'darkgreen', 'darkmagenta', 'darkcyan', 'red'],
|
||||
\ 'parentheses': ['start=/(/ end=/)/ fold', 'start=/\[/ end=/\]/ fold', 'start=/{/ end=/}/ fold']
|
||||
\}
|
||||
let g:rainbow_active = 1
|
||||
{
|
||||
plugin = rainbow;
|
||||
config = ''
|
||||
let g:rainbow_conf = {
|
||||
\ 'guifgs': ['RoyalBlue3', 'SeaGreen3', 'DarkOrchid3', 'firebrick3', 'RoyalBlue3', 'SeaGreen3', 'DarkOrchid3', 'firebrick3', 'RoyalBlue3', 'DarkOrchid3', 'firebrick3', 'RoyalBlue3', 'SeaGreen3', 'DarkOrchid3', 'firebrick3'],
|
||||
\ 'ctermfgs': ['red', 'brown', 'blue', 'gray', 'green', 'magenta', 'cyan', 'darkred', 'brown', 'darkblue', 'gray', 'darkgreen', 'darkmagenta', 'darkcyan', 'red'],
|
||||
\ 'parentheses': ['start=/(/ end=/)/ fold', 'start=/\[/ end=/\]/ fold', 'start=/{/ end=/}/ fold']
|
||||
\}
|
||||
let g:rainbow_active = 1
|
||||
'';
|
||||
}
|
||||
}
|
||||
vim-signify
|
||||
vim-indent-guides
|
||||
vim-surround
|
||||
fugitive
|
||||
{ plugin = easymotion;
|
||||
config = ''
|
||||
map / <Plug>(easymotion-sn)
|
||||
omap / <Plug>(easymotion-tn)
|
||||
map n <Plug>(easymotion-next)
|
||||
map N <Plug>(easymotion-prev)
|
||||
let g:EasyMotion_landing_highlight = 0
|
||||
{
|
||||
plugin = easymotion;
|
||||
config = ''
|
||||
map / <Plug>(easymotion-sn)
|
||||
omap / <Plug>(easymotion-tn)
|
||||
map n <Plug>(easymotion-next)
|
||||
map N <Plug>(easymotion-prev)
|
||||
let g:EasyMotion_landing_highlight = 0
|
||||
'';
|
||||
}
|
||||
}
|
||||
vinegar
|
||||
undotree
|
||||
{ plugin = vim-test;
|
||||
config = ''
|
||||
nmap <silent> <leader>t :TestNearest<CR>
|
||||
nmap <silent> <leader>T :TestFile<CR>
|
||||
nmap <silent> <leader>a :TestSuite<CR>
|
||||
nmap <silent> <leader>l :TestLast<CR>
|
||||
nmap <silent> <leader>g :TestVisit<CR>
|
||||
let test#strategy = "neovim"
|
||||
{
|
||||
plugin = vim-test;
|
||||
config = ''
|
||||
nmap <silent> <leader>t :TestNearest<CR>
|
||||
nmap <silent> <leader>T :TestFile<CR>
|
||||
nmap <silent> <leader>a :TestSuite<CR>
|
||||
nmap <silent> <leader>l :TestLast<CR>
|
||||
nmap <silent> <leader>g :TestVisit<CR>
|
||||
let test#strategy = "neovim"
|
||||
'';
|
||||
}
|
||||
{ plugin = ale;
|
||||
config = ''
|
||||
let g:ale_fix_on_save = 1
|
||||
let g:ale_elixir_credo_strict = 1
|
||||
let g:ale_fixers = {
|
||||
\ 'elm': ['elm-format', 'format'],
|
||||
\ 'javascript': ['prettier'],
|
||||
\ 'javascript.jsx': ['prettier'],
|
||||
\ 'javascriptreact': ['prettier'],
|
||||
\ 'typescriptreact': ['prettier'],
|
||||
\ 'typescript': ['prettier'],
|
||||
\ 'ruby': ['sorbet'],
|
||||
\ 'rust': ['rustfmt'],
|
||||
\ 'elixir': ['mix_format']
|
||||
\}
|
||||
let g:ale_linters_explicit = 1
|
||||
}
|
||||
{
|
||||
plugin = ale;
|
||||
config = ''
|
||||
let g:ale_fix_on_save = 1
|
||||
let g:ale_elixir_credo_strict = 1
|
||||
let g:ale_fixers = {
|
||||
\ 'javascript': ['prettier'],
|
||||
\ 'javascript.jsx': ['prettier'],
|
||||
\ 'javascriptreact': ['prettier'],
|
||||
\ 'ruby': ['sorbet'],
|
||||
\ 'rust': ['rustfmt'],
|
||||
\}
|
||||
let g:ale_linters_explicit = 1
|
||||
'';
|
||||
}
|
||||
}
|
||||
fzf-vim
|
||||
fzfWrapper
|
||||
{ plugin = nvim-compe;
|
||||
config = ''
|
||||
set completeopt=menuone,noselect
|
||||
let g:compe = {}
|
||||
let g:compe.enabled = v:true
|
||||
let g:compe.autocomplete = v:true
|
||||
let g:compe.debug = v:false
|
||||
let g:compe.min_length = 1
|
||||
let g:compe.preselect = 'enable'
|
||||
let g:compe.throttle_time = 80
|
||||
let g:compe.source_timeout = 200
|
||||
let g:compe.resolve_timeout = 800
|
||||
let g:compe.incomplete_delay = 400
|
||||
let g:compe.max_abbr_width = 100
|
||||
let g:compe.max_kind_width = 100
|
||||
let g:compe.max_menu_width = 100
|
||||
let g:compe.documentation = v:true
|
||||
{
|
||||
plugin = nvim-compe;
|
||||
config = ''
|
||||
set completeopt=menuone,noselect
|
||||
let g:compe = {}
|
||||
let g:compe.enabled = v:true
|
||||
let g:compe.autocomplete = v:true
|
||||
let g:compe.debug = v:false
|
||||
let g:compe.min_length = 1
|
||||
let g:compe.preselect = 'enable'
|
||||
let g:compe.throttle_time = 80
|
||||
let g:compe.source_timeout = 200
|
||||
let g:compe.resolve_timeout = 800
|
||||
let g:compe.incomplete_delay = 400
|
||||
let g:compe.max_abbr_width = 100
|
||||
let g:compe.max_kind_width = 100
|
||||
let g:compe.max_menu_width = 100
|
||||
let g:compe.documentation = v:true
|
||||
|
||||
let g:compe.source = {}
|
||||
let g:compe.source.path = v:true
|
||||
let g:compe.source.buffer = v:true
|
||||
let g:compe.source.calc = v:true
|
||||
let g:compe.source.nvim_lsp = v:true
|
||||
let g:compe.source.nvim_lua = v:true
|
||||
let g:compe.source.vsnip = v:true
|
||||
let g:compe.source.ultisnips = v:true
|
||||
let g:compe.source.luasnip = v:true
|
||||
let g:compe.source.emoji = v:true
|
||||
let g:compe.source = {}
|
||||
let g:compe.source.path = v:true
|
||||
let g:compe.source.buffer = v:true
|
||||
let g:compe.source.calc = v:true
|
||||
let g:compe.source.nvim_lsp = v:true
|
||||
let g:compe.source.nvim_lua = v:true
|
||||
let g:compe.source.vsnip = v:true
|
||||
let g:compe.source.ultisnips = v:true
|
||||
let g:compe.source.luasnip = v:true
|
||||
let g:compe.source.emoji = v:true
|
||||
'';
|
||||
}
|
||||
}
|
||||
vim-goyo
|
||||
{ plugin = nvim-lspconfig ;
|
||||
config = ''
|
||||
lua << EOF
|
||||
require'lspconfig'.elmls.setup{}
|
||||
require'lspconfig'.tsserver.setup{}
|
||||
require'lspconfig'.elixirls.setup{
|
||||
cmd = { "${pkgs.elixir_ls}/bin/elixir-ls" };
|
||||
{
|
||||
plugin = nvim-lspconfig;
|
||||
config = ''
|
||||
lua << EOF
|
||||
${readFile (
|
||||
pkgs.substituteAll {
|
||||
src = ./vim/nvim-lspconfig.lua;
|
||||
# since both of these are used for actually configuring the system,
|
||||
# we'll probably always want them around.
|
||||
lua_ls = pkgs.sumneko-lua-language-server;
|
||||
rnix_lsp = pkgs.rnix-lsp;
|
||||
}
|
||||
EOF
|
||||
) }
|
||||
EOF
|
||||
'';
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
extraConfig = readFile ./vim/init.vim;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue