Update vim plugins
This commit is contained in:
parent
07cfcb7b4b
commit
1ae28d39ec
3 changed files with 117 additions and 63 deletions
|
|
@ -28,26 +28,32 @@ with builtins;
|
|||
vimAlias = true;
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
vim-sensible
|
||||
vim-startify
|
||||
catppuccin-nvim
|
||||
vim-precognition
|
||||
nvim-treesitter.withAllGrammars
|
||||
|
||||
{
|
||||
plugin = fzf-vim;
|
||||
plugin = vim-precognition;
|
||||
config = ''
|
||||
noremap <leader>fc :BCommits<CR>
|
||||
lua << EOF
|
||||
require("precognition").setup({})
|
||||
EOF
|
||||
noremap ? :lua require("precognition").peek()<CR>
|
||||
'';
|
||||
}
|
||||
plenary-nvim
|
||||
{
|
||||
plugin = nvim-treesitter-legacy.withAllGrammars;
|
||||
config = ''
|
||||
lua << EOF
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
}
|
||||
EOF
|
||||
'';
|
||||
}
|
||||
vim-elixir
|
||||
alchemist-vim
|
||||
vim-nix
|
||||
vim-javascript
|
||||
vim-json
|
||||
vim-jsx-pretty
|
||||
|
||||
vim-commentary
|
||||
vim-airline
|
||||
# cosmetic improvements
|
||||
catppuccin-nvim
|
||||
vim-illuminate
|
||||
{
|
||||
plugin = rainbow;
|
||||
config = ''
|
||||
|
|
@ -66,37 +72,58 @@ with builtins;
|
|||
let g:indent_guides_start_level = 2
|
||||
'';
|
||||
}
|
||||
|
||||
# language-agnostic editor improvements
|
||||
{
|
||||
plugin = fzf-vim;
|
||||
config = ''
|
||||
noremap <leader>fc :BCommits<CR>
|
||||
'';
|
||||
}
|
||||
which-key-nvim
|
||||
{
|
||||
plugin = alpha-nvim;
|
||||
config = ''
|
||||
lua << EOF
|
||||
local alpha = require("alpha");
|
||||
local dashboard = require("alpha.themes.startify");
|
||||
alpha.setup(dashboard.config);
|
||||
EOF
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = nvim-autopairs;
|
||||
config = ''
|
||||
lua << EOF
|
||||
require("nvim-autopairs").setup {}
|
||||
EOF
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = lualine-nvim;
|
||||
config = ''
|
||||
lua << EOF
|
||||
require('lualine').setup()
|
||||
EOF
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = comment-nvim;
|
||||
config = ''
|
||||
lua << EOF
|
||||
require('Comment').setup()
|
||||
EOF
|
||||
'';
|
||||
}
|
||||
vim-surround
|
||||
{
|
||||
plugin = vim-fugitive;
|
||||
# file explorer
|
||||
plugin = oil-nvim;
|
||||
config = ''
|
||||
nnoremap gb :Git blame<CR>
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = git-blame-nvim;
|
||||
config = ''
|
||||
let g:gitblame_date_format = '%Y-%m-%d'
|
||||
nnoremap gC :GitBlameOpenCommitURL<CR>
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = neogit;
|
||||
config = ''
|
||||
noremap <leader>g :Neogit<CR>
|
||||
lua << EOF
|
||||
local neogit = require('neogit')
|
||||
neogit.setup {}
|
||||
EOF
|
||||
'';
|
||||
}
|
||||
vinegar
|
||||
{
|
||||
plugin = gitsigns-nvim;
|
||||
config = ''
|
||||
lua << EOF
|
||||
require('gitsigns').setup()
|
||||
EOF
|
||||
lua << EOF
|
||||
require("oil").setup()
|
||||
vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory" })
|
||||
EOF
|
||||
'';
|
||||
}
|
||||
{
|
||||
|
|
@ -118,6 +145,42 @@ with builtins;
|
|||
endif
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = telescope-nvim;
|
||||
config = ''
|
||||
nnoremap <leader>ff <cmd>lua require('telescope.builtin').find_files()<cr>
|
||||
nnoremap <leader>fg <cmd>lua require('telescope.builtin').live_grep()<cr>
|
||||
nnoremap <leader>fb <cmd>lua require('telescope.builtin').buffers()<cr>
|
||||
nnoremap <leader>fh <cmd>lua require('telescope.builtin').help_tags()<cr>
|
||||
'';
|
||||
}
|
||||
nvim-dap
|
||||
nvim-dap-ui
|
||||
|
||||
# Git stuff
|
||||
{
|
||||
plugin = vim-fugitive;
|
||||
config = ''
|
||||
nnoremap gb :Git blame<CR>
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = git-blame-nvim;
|
||||
config = ''
|
||||
let g:gitblame_date_format = '%Y-%m-%d'
|
||||
nnoremap gC :GitBlameOpenCommitURL<CR>
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = gitsigns-nvim;
|
||||
config = ''
|
||||
lua << EOF
|
||||
require('gitsigns').setup()
|
||||
EOF
|
||||
'';
|
||||
}
|
||||
|
||||
# Language servers
|
||||
cmp-nvim-lsp
|
||||
{
|
||||
plugin = nvim-lspconfig;
|
||||
|
|
@ -129,22 +192,20 @@ with builtins;
|
|||
# we'll probably always want them around.
|
||||
lua_ls = pkgs.lua-language-server;
|
||||
nixd = pkgs.nixd;
|
||||
ts_server = pkgs.nodePackages.typescript-language-server;
|
||||
|
||||
# Nearly always want the diagnostic server
|
||||
diagnostic_server = pkgs.nodePackages.diagnostic-languageserver;
|
||||
}
|
||||
) }
|
||||
EOF
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = telescope-nvim;
|
||||
config = ''
|
||||
nnoremap <leader>ff <cmd>lua require('telescope.builtin').find_files()<cr>
|
||||
nnoremap <leader>fg <cmd>lua require('telescope.builtin').live_grep()<cr>
|
||||
nnoremap <leader>fb <cmd>lua require('telescope.builtin').buffers()<cr>
|
||||
nnoremap <leader>fh <cmd>lua require('telescope.builtin').help_tags()<cr>
|
||||
'';
|
||||
}
|
||||
|
||||
# language-specific plugins
|
||||
vim-nix
|
||||
vim-json
|
||||
dart-vim-plugin
|
||||
|
||||
# have the completion plugin get loaded last just in case anything above
|
||||
# needs to do setup work before completions get set up.
|
||||
{
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ autocmd BufWritePre * :%s/\s\+$//e
|
|||
noremap ; :
|
||||
inoremap jj <Esc>
|
||||
noremap Q <nop>
|
||||
noremap ? :lua require("precognition").peek()<CR>
|
||||
|
||||
""" Esperanto digraphs (for use with ctrl-k)
|
||||
:digraph Cx 264
|
||||
|
|
@ -85,11 +84,3 @@ set scrolloff=10
|
|||
if filereadable($HOME . "/.vimrc.local")
|
||||
source ~/.vimrc.local
|
||||
endif
|
||||
|
||||
lua << EOF
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
}
|
||||
EOF
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ capabilitiesWithoutFomatting.textDocument.rangeFormatting = false
|
|||
capabilitiesWithoutFomatting.textDocument.range_formatting = false
|
||||
|
||||
nvim_lsp.ts_ls.setup {
|
||||
cmd = { "@ts_server@/bin/typescript-language-server", '--stdio' },
|
||||
cmd = { "typescript-language-server", '--stdio' },
|
||||
init_options = {
|
||||
hostInfo = "neovim",
|
||||
maxTsServerMemory = "8192",
|
||||
|
|
@ -185,3 +185,5 @@ nvim_lsp.lua_ls.setup {
|
|||
nvim_lsp.texlab.setup {}
|
||||
|
||||
nvim_lsp.gleam.setup {}
|
||||
|
||||
nvim_lsp.dartls.setup {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue