Skip to content

Commit

Permalink
home-manager/neovim: reorganize plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Nov 14, 2023
1 parent 03aa69f commit 81d7eec
Showing 1 changed file with 50 additions and 50 deletions.
100 changes: 50 additions & 50 deletions home-manager/editor/neovim.nix
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,56 @@ in
let g:maplocalleader = ','
'';
}
{
plugin = undotree;
config = /* vimscript */ ''
if !isdirectory($HOME . "/.config/nvim/undotree")
call mkdir($HOME . "/.config/nvim/undotree", "p", 0755)
endif
set undofile
set undodir=~/.config/nvim/undotree
let undotree_WindowLayout = 3
lua << EOF
vim.keymap.set('n', '<Leader>u', ':UndotreeToggle<CR>', { desc = "Undotree toggle" })
EOF
'';
}
{
plugin = vim-polyglot;
config = /* vimscript */ ''
" use a simpler and faster regex to parse CSV
" does not work with CSVs where the delimiter is quoted inside the field
" let g:csv_strict_columns = 1
" disabled CSV concealing (e.g.: `,` -> `|`), also faster
let g:csv_no_conceal = 1
'';
}
{
plugin = vim-sneak;
config = /* vimscript */ ''
let g:sneak#label = 1
map f <Plug>Sneak_f
map F <Plug>Sneak_F
map t <Plug>Sneak_t
map T <Plug>Sneak_T
'';
}
{
plugin = vim-test;
config = /* vimscript */ ''
let g:test#strategy = "neovim"
let g:test#neovim#start_normal = 1
let g:test#neovim#term_position = "vert botright"
lua << EOF
vim.keymap.set('n', '<Leader>tt', ':TestNearest<CR>', { desc = "Test nearest" })
vim.keymap.set('n', '<Leader>tT', ':TestFile<CR>', { desc = "Test file" })
vim.keymap.set('n', '<Leader>ts', ':TestSuite<CR>', { desc = "Test suite" })
vim.keymap.set('n', '<Leader>tl', ':TestLast<CR>', { desc = "Test last" })
vim.keymap.set('n', '<Leader>tv', ':TestVisit<CR>', { desc = "Test visit" })
EOF
'';
}
{
plugin = pkgs.writeText "01-init-pre-lua" "";
type = "lua";
Expand Down Expand Up @@ -297,41 +347,6 @@ in
require('remember').setup {}
'';
}
{
plugin = undotree;
config = /* vimscript */ ''
if !isdirectory($HOME . "/.config/nvim/undotree")
call mkdir($HOME . "/.config/nvim/undotree", "p", 0755)
endif
set undofile
set undodir=~/.config/nvim/undotree
let undotree_WindowLayout = 3
lua << EOF
vim.keymap.set('n', '<Leader>u', ':UndotreeToggle<CR>', { desc = "Undotree toggle" })
EOF
'';
}
{
plugin = vim-polyglot;
config = /* vimscript */ ''
" use a simpler and faster regex to parse CSV
" does not work with CSVs where the delimiter is quoted inside the field
" let g:csv_strict_columns = 1
" disabled CSV concealing (e.g.: `,` -> `|`), also faster
let g:csv_no_conceal = 1
'';
}
{
plugin = vim-sneak;
config = /* vimscript */ ''
let g:sneak#label = 1
map f <Plug>Sneak_f
map F <Plug>Sneak_F
map t <Plug>Sneak_t
map T <Plug>Sneak_T
'';
}
{
plugin = telescope-nvim;
type = "lua";
Expand Down Expand Up @@ -414,21 +429,6 @@ in
)
'';
}
{
plugin = vim-test;
config = /* vimscript */ ''
let g:test#strategy = "neovim"
let g:test#neovim#start_normal = 1
let g:test#neovim#term_position = "vert botright"
lua << EOF
vim.keymap.set('n', '<Leader>tt', ':TestNearest<CR>', { desc = "Test nearest" })
vim.keymap.set('n', '<Leader>tT', ':TestFile<CR>', { desc = "Test file" })
vim.keymap.set('n', '<Leader>ts', ':TestSuite<CR>', { desc = "Test suite" })
vim.keymap.set('n', '<Leader>tl', ':TestLast<CR>', { desc = "Test last" })
vim.keymap.set('n', '<Leader>tv', ':TestVisit<CR>', { desc = "Test visit" })
EOF
'';
}
mkdir-nvim
telescope-fzf-native-nvim
vim-advanced-sorters
Expand Down

0 comments on commit 81d7eec

Please sign in to comment.