Started experimenting with neovim
This commit is contained in:
parent
91b3d93de6
commit
9ad9e6d7c3
4 changed files with 105 additions and 8 deletions
|
@ -12,7 +12,8 @@
|
|||
./rofi.nix
|
||||
./sway/sway.nix
|
||||
./tmux.nix
|
||||
./vim/vim.nix
|
||||
#./vim/vim.nix
|
||||
./neovim.nix
|
||||
./zsh.nix
|
||||
];
|
||||
|
||||
|
|
95
users/alejandro/neovim.nix
Normal file
95
users/alejandro/neovim.nix
Normal file
|
@ -0,0 +1,95 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [fzf fd];
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
withNodeJs = true;
|
||||
withPython3 = true;
|
||||
extraPython3Packages = ps: with ps; [black isort flake8 ipdb];
|
||||
#extraPackages = with pkgs; [];
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
# tree-sitter (code parser)
|
||||
(nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars))
|
||||
|
||||
# Eye candy
|
||||
nvim-web-devicons
|
||||
base16-vim
|
||||
|
||||
# Telescope (fuzzy finding)
|
||||
{
|
||||
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>
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = telescope-file-browser-nvim;
|
||||
type = "lua";
|
||||
config = ''
|
||||
vim.api.nvim_set_keymap(
|
||||
"n",
|
||||
"<space>fb",
|
||||
":Telescope file_browser<CR>",
|
||||
{ noremap = true }
|
||||
)
|
||||
require("telescope").load_extension("file_browser")
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = telescope-coc-nvim;
|
||||
type = "lua";
|
||||
config = ''
|
||||
require("telescope").setup({
|
||||
extensions = {
|
||||
coc = {
|
||||
prefer_locations = true;
|
||||
}
|
||||
}
|
||||
})
|
||||
require("telescope").load_extension("coc")
|
||||
|
||||
vim.api.nvim_set_keymap(
|
||||
"n",
|
||||
"<leader>coc",
|
||||
":Telescope coc<CR>",
|
||||
{ noremap = true }
|
||||
)
|
||||
'';
|
||||
}
|
||||
|
||||
# tmux integration
|
||||
tmux-navigator
|
||||
];
|
||||
|
||||
coc = {
|
||||
enable = true;
|
||||
settings = ''
|
||||
{
|
||||
coc.preferences.formatOnSaveFiletypes": [
|
||||
"*"
|
||||
],
|
||||
python.formatting.provider": "black"
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
let mapleader = "'"
|
||||
|
||||
" Colorscheme
|
||||
if !exists('g:colors_name') || g:colors_name != 'base16-darktooth'
|
||||
set background=dark
|
||||
let base16colorspace=256
|
||||
colorscheme base16-darktooth
|
||||
hi Normal ctermbg=NONE guibg=NONE
|
||||
endif
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue