home-manager/neovim/default.nix

204 lines
5.5 KiB
Nix
Raw Permalink Normal View History

2024-07-27 20:22:59 +00:00
{ pkgs, theme, vimwikiPath, ... }:
2024-07-10 06:10:56 +00:00
{
2024-07-10 11:40:41 +00:00
# symlink for a stable path
2024-07-10 10:52:58 +00:00
home.file.".vscode-extensions/vscode-lldb".source = pkgs.vscode-extensions.vadimcn.vscode-lldb;
2024-07-10 06:10:56 +00:00
programs = {
neovim = {
enable = true;
2024-07-10 10:52:58 +00:00
package = pkgs.neovim-unwrapped;
2024-07-10 06:10:56 +00:00
defaultEditor = true;
2024-07-10 10:52:58 +00:00
plugins = with pkgs.vimPlugins; [
2024-07-10 06:10:56 +00:00
# theme
nvim-solarized-lua
# auto-close brackets, etc
nvim-autopairs
2024-07-10 06:10:56 +00:00
# better wildmenu
wilder-nvim
2024-07-13 18:59:19 +00:00
# undo-tree
undotree
2024-07-13 19:07:48 +00:00
# quickfix
nvim-bqf
2024-07-10 11:40:41 +00:00
# ui
2024-07-10 06:10:56 +00:00
dressing-nvim
# session handling
project-nvim
auto-session
2024-07-10 11:40:41 +00:00
# escape handling
2024-07-10 06:10:56 +00:00
better-escape-nvim
nvim-treesitter.withAllGrammars
nvim-treesitter-textobjects
nvim-ts-context-commentstring
2024-07-10 06:10:56 +00:00
markdown-preview-nvim # use({ "iamcco/markdown-preview.nvim", run = ":call mkdp#util#install()" })
toggleterm-nvim
nvim-notify
comment-nvim
lualine-nvim
tabline-nvim
indent-blankline-nvim
plenary-nvim
vim-illuminate
vim-surround
neogen
2024-07-10 06:10:56 +00:00
# git
gitsigns-nvim
vim-fugitive
vim-flog
git-blame-nvim
nvim-web-devicons # used by diffview-nvim
# snippets
friendly-snippets
luasnip
# auto-completion
nvim-cmp
cmp-nvim-lsp
cmp-buffer
cmp-path
cmp-cmdline
cmp-nvim-lua
cmp_luasnip
cmp-calc
cmp-nvim-lsp-signature-help
# telescope
telescope-nvim
telescope-fzf-native-nvim
telescope-ui-select-nvim
# LSP
nvim-lspconfig
lsp-status-nvim
rustaceanvim
neodev-nvim
2024-07-27 20:22:59 +00:00
none-ls-nvim
2024-07-10 06:10:56 +00:00
lsp_lines-nvim
lsp-inlayhints-nvim
2024-12-20 13:28:27 +00:00
# Copilot
copilot-lua
copilot-cmp
2024-07-10 06:10:56 +00:00
# debugging
nvim-dap
nvim-dap-ui
2024-07-27 20:22:59 +00:00
# vim-wiki
vimwiki
2024-12-20 13:28:02 +00:00
# firenvim
firenvim
2024-07-10 06:10:56 +00:00
];
withNodeJs = true;
2024-07-10 10:52:58 +00:00
extraPackages = with pkgs; [
2024-07-10 06:10:56 +00:00
# language servers
lua-language-server
bash-language-server
2024-07-27 20:22:59 +00:00
prettierd
2024-07-10 06:10:56 +00:00
nodePackages.yaml-language-server
nodePackages.dockerfile-language-server-nodejs
nodePackages.vscode-langservers-extracted
lldb
vscode-extensions.vadimcn.vscode-lldb
marksman
clang-tools
cmake-language-server
texlab
nixd
nixpkgs-fmt
bitbake-language-server
(python3.withPackages (ps: with ps; [
pep8
autopep8
python-lsp-server
]))
#clipboard
xclip
2024-07-27 20:22:59 +00:00
#vimwiki
vimwiki-markdown
2024-07-10 06:10:56 +00:00
];
extraLuaConfig = ''
vim.loader.enable()
2024-07-29 11:13:03 +00:00
require("local_keymaps")
require("local_options")
require("local_commands")
require("local_treesitter")
require("local_lspconfig")
require("local_auto-session")
require("local_toggleterm")
require("local_notify")
require("local_comment")
2024-12-20 13:28:02 +00:00
if vim.g.started_by_firenvim ~= true then
require("local_lualine")
require("local_tabline")
end
2024-07-29 11:13:03 +00:00
require("local_indent-blankline")
require("local_gitsigns")
require("local_luasnip")
require("local_nvim-cmp")
require("local_telescope")
require("local_themes").setup("${theme}")
require("local_project-nvim")
require("local_dap")
require("local_illuminate")
require("local_wilder")
require("local_vimwiki").setup("${vimwikiPath}")
vim.g.gitblame_date_format = "%r"
require("nvim-autopairs").setup({})
require("neogen").setup({ snippet_engine = "luasnip" })
2024-12-20 13:28:02 +00:00
require("local_firenvim")
2024-07-10 06:10:56 +00:00
'';
};
};
2024-07-29 11:13:03 +00:00
home.file.".config/nvim/lua/local_keymaps.lua".source = ./keymaps.lua;
home.file.".config/nvim/lua/local_options.lua".source = ./options.lua;
home.file.".config/nvim/lua/local_commands.lua".source = ./commands.lua;
home.file.".config/nvim/lua/local_treesitter.lua".source = ./treesitter.lua;
home.file.".config/nvim/lua/local_lspconfig.lua".source = ./lspconfig.lua;
home.file.".config/nvim/lua/local_auto-session.lua".source = ./auto-session.lua;
home.file.".config/nvim/lua/local_toggleterm.lua".source = ./toggleterm.lua;
home.file.".config/nvim/lua/local_notify.lua".source = ./notify.lua;
home.file.".config/nvim/lua/local_comment.lua".source = ./comment.lua;
home.file.".config/nvim/lua/local_lualine.lua".source = ./lualine.lua;
home.file.".config/nvim/lua/local_tabline.lua".source = ./tabline.lua;
home.file.".config/nvim/lua/local_indent-blankline.lua".source = ./indent-blankline.lua;
home.file.".config/nvim/lua/local_gitsigns.lua".source = ./gitsigns.lua;
home.file.".config/nvim/lua/local_luasnip.lua".source = ./luasnip.lua;
home.file.".config/nvim/lua/local_nvim-cmp.lua".source = ./nvim-cmp.lua;
home.file.".config/nvim/lua/local_telescope.lua".source = ./telescope.lua;
home.file.".config/nvim/lua/local_themes.lua".source = ./themes.lua;
home.file.".config/nvim/lua/local_vimwiki.lua".source = ./vimwiki.lua;
home.file.".config/nvim/lua/local_project-nvim.lua".source = ./project-nvim.lua;
home.file.".config/nvim/lua/local_dap.lua".source = ./dap.lua;
home.file.".config/nvim/lua/local_illuminate.lua".source = ./illuminate.lua;
home.file.".config/nvim/lua/local_wilder.lua".source = ./wilder.lua;
2024-12-20 13:28:02 +00:00
home.file.".config/nvim/lua/local_firenvim.lua".source = ./firenvim.lua;
2024-07-10 06:10:56 +00:00
}