Update vim plugins

This commit is contained in:
Haak Saxberg 2026-03-19 10:48:46 -07:00
parent 07cfcb7b4b
commit 1ae28d39ec
3 changed files with 117 additions and 63 deletions

View file

@ -28,26 +28,32 @@ with builtins;
vimAlias = true; vimAlias = true;
plugins = with pkgs.vimPlugins; [ plugins = with pkgs.vimPlugins; [
vim-sensible vim-sensible
vim-startify
catppuccin-nvim
vim-precognition
nvim-treesitter.withAllGrammars
{ {
plugin = fzf-vim; plugin = vim-precognition;
config = '' 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 # cosmetic improvements
vim-airline catppuccin-nvim
vim-illuminate
{ {
plugin = rainbow; plugin = rainbow;
config = '' config = ''
@ -66,36 +72,57 @@ with builtins;
let g:indent_guides_start_level = 2 let g:indent_guides_start_level = 2
''; '';
} }
vim-surround
# language-agnostic editor improvements
{ {
plugin = vim-fugitive; plugin = fzf-vim;
config = '' config = ''
nnoremap gb :Git blame<CR> noremap <leader>fc :BCommits<CR>
''; '';
} }
which-key-nvim
{ {
plugin = git-blame-nvim; plugin = alpha-nvim;
config = '' config = ''
let g:gitblame_date_format = '%Y-%m-%d'
nnoremap gC :GitBlameOpenCommitURL<CR>
'';
}
{
plugin = neogit;
config = ''
noremap <leader>g :Neogit<CR>
lua << EOF lua << EOF
local neogit = require('neogit') local alpha = require("alpha");
neogit.setup {} local dashboard = require("alpha.themes.startify");
alpha.setup(dashboard.config);
EOF EOF
''; '';
} }
vinegar
{ {
plugin = gitsigns-nvim; plugin = nvim-autopairs;
config = '' config = ''
lua << EOF lua << EOF
require('gitsigns').setup() 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
{
# file explorer
plugin = oil-nvim;
config = ''
lua << EOF
require("oil").setup()
vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory" })
EOF EOF
''; '';
} }
@ -118,6 +145,42 @@ with builtins;
endif 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 cmp-nvim-lsp
{ {
plugin = nvim-lspconfig; plugin = nvim-lspconfig;
@ -129,22 +192,20 @@ with builtins;
# we'll probably always want them around. # we'll probably always want them around.
lua_ls = pkgs.lua-language-server; lua_ls = pkgs.lua-language-server;
nixd = pkgs.nixd; nixd = pkgs.nixd;
ts_server = pkgs.nodePackages.typescript-language-server;
# Nearly always want the diagnostic server
diagnostic_server = pkgs.nodePackages.diagnostic-languageserver; diagnostic_server = pkgs.nodePackages.diagnostic-languageserver;
} }
) } ) }
EOF EOF
''; '';
} }
{
plugin = telescope-nvim; # language-specific plugins
config = '' vim-nix
nnoremap <leader>ff <cmd>lua require('telescope.builtin').find_files()<cr> vim-json
nnoremap <leader>fg <cmd>lua require('telescope.builtin').live_grep()<cr> dart-vim-plugin
nnoremap <leader>fb <cmd>lua require('telescope.builtin').buffers()<cr>
nnoremap <leader>fh <cmd>lua require('telescope.builtin').help_tags()<cr>
'';
}
# have the completion plugin get loaded last just in case anything above # have the completion plugin get loaded last just in case anything above
# needs to do setup work before completions get set up. # needs to do setup work before completions get set up.
{ {

View file

@ -51,7 +51,6 @@ autocmd BufWritePre * :%s/\s\+$//e
noremap ; : noremap ; :
inoremap jj <Esc> inoremap jj <Esc>
noremap Q <nop> noremap Q <nop>
noremap ? :lua require("precognition").peek()<CR>
""" Esperanto digraphs (for use with ctrl-k) """ Esperanto digraphs (for use with ctrl-k)
:digraph Cx 264 :digraph Cx 264
@ -85,11 +84,3 @@ set scrolloff=10
if filereadable($HOME . "/.vimrc.local") if filereadable($HOME . "/.vimrc.local")
source ~/.vimrc.local source ~/.vimrc.local
endif endif
lua << EOF
require'nvim-treesitter.configs'.setup {
highlight = {
enable = true,
},
}
EOF

View file

@ -151,7 +151,7 @@ capabilitiesWithoutFomatting.textDocument.rangeFormatting = false
capabilitiesWithoutFomatting.textDocument.range_formatting = false capabilitiesWithoutFomatting.textDocument.range_formatting = false
nvim_lsp.ts_ls.setup { nvim_lsp.ts_ls.setup {
cmd = { "@ts_server@/bin/typescript-language-server", '--stdio' }, cmd = { "typescript-language-server", '--stdio' },
init_options = { init_options = {
hostInfo = "neovim", hostInfo = "neovim",
maxTsServerMemory = "8192", maxTsServerMemory = "8192",
@ -185,3 +185,5 @@ nvim_lsp.lua_ls.setup {
nvim_lsp.texlab.setup {} nvim_lsp.texlab.setup {}
nvim_lsp.gleam.setup {} nvim_lsp.gleam.setup {}
nvim_lsp.dartls.setup {}