nixos-config/home-manager/neovim/default.nix

197 lines
5.2 KiB
Nix
Raw Normal View History

2022-08-18 19:15:03 +00:00
{ config, lib, pkgs, user, theme, ... }:
let
cmp-nvim-lsp-signature-help = pkgs.vimUtils.buildVimPlugin {
name = "cmp-nvim-lsp-signature-help";
version = "2023-02-27";
src = pkgs.fetchFromGitHub {
owner = "hrsh7th";
repo = "cmp-nvim-lsp-signature-help";
rev = "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1";
sha256 = "sha256-yDxYvjTIeXIKYR3tg+bf+okXKr5JYc/I9obP+6uKey4=";
};
meta.homepage = "https://github.com/hrsh7th/cmp-nvim-lsp-signature-help";
};
2022-07-25 06:48:10 +00:00
lsp_lines-nvim = pkgs.vimUtils.buildVimPlugin {
name = "lsp_lines.nvim";
version = "2023-02-27";
2022-07-25 06:48:10 +00:00
src = pkgs.fetchgit {
url = "https://git.sr.ht/~whynothugo/lsp_lines.nvim";
rev = "ec98b45c8280e5ef8c84028d4f38aa447276c002";
sha256 = "sha256-HjLCfuvZZ7vTJT0Te5VBRLNWvWIBFBou1Mvoxe2Hi3c=";
2022-07-25 06:48:10 +00:00
};
meta.homepage = "https://git.sr.ht/~whynothugo/lsp_lines.nvim";
};
2022-08-05 12:25:44 +00:00
pre-commit-nvim = pkgs.vimUtils.buildVimPlugin {
name = "pre-commit.nvim";
version = "2022-08-05";
src = pkgs.fetchgit {
url = "https://github.com/Ttibsi/pre-commit.nvim";
rev = "4a608cef0f0a196fa39cdc60579eb9cf601d21c4";
sha256 = "Y0biF/yrOX1YYztj8/u0n8zPN4YLGLSQL3vb9I3+3dE=";
};
meta.homepage = "https://github.com/Ttibsi/pre-commit.nvim";
};
2023-01-25 09:43:54 +00:00
vim-flog = pkgs.vimUtils.buildVimPlugin {
name = "vim-flog";
version = "2023-01-24";
src = pkgs.fetchgit {
url = "https://github.com/rbong/vim-flog";
rev = "2ba8af2c9682e3560db5b813d10acf3ba3415bc1";
sha256 = "sha256-xnzHAc30DD9W9/5s8PvpuBaEUJbB4BJ7WqbNb/CY3mY=";
2023-01-25 09:43:54 +00:00
};
meta.homepage = "https://github.com/rbong/vim-flog/";
};
in
{
2023-03-13 12:52:54 +00:00
home.packages = with pkgs.unstable; [
xclip
# language servers
lua-language-server
rnix-lsp
terraform-ls
tflint
2022-08-05 12:25:25 +00:00
nodejs
nodePackages.bash-language-server
2022-06-26 19:12:32 +00:00
nodePackages.yaml-language-server
nodePackages.prettier
nodePackages.eslint_d
nodePackages.typescript-language-server
nodePackages.typescript
nodePackages.dockerfile-language-server-nodejs
2023-04-11 05:40:10 +00:00
nodePackages.vscode-langservers-extracted
2023-10-16 18:47:49 +00:00
nodePackages.volar
2022-08-23 09:46:14 +00:00
lldb
vscode-extensions.vadimcn.vscode-lldb
2023-10-16 18:28:18 +00:00
marksman
2023-10-18 07:21:07 +00:00
clang-tools
cmake-language-server
];
2022-08-23 09:46:14 +00:00
# symlink for a stable path
2023-03-13 12:52:54 +00:00
home.file.".vscode-extensions/vscode-lldb".source = pkgs.unstable.vscode-extensions.vadimcn.vscode-lldb;
2022-08-23 09:46:14 +00:00
2022-12-08 13:09:51 +00:00
home.sessionVariables = {
EDITOR = "nvim";
};
programs = {
neovim = {
enable = true;
2023-06-14 06:32:33 +00:00
package = pkgs.unstable.neovim-unwrapped;
2023-03-13 12:52:54 +00:00
plugins = with pkgs.unstable.vimPlugins; [
# theme
nvim-solarized-lua
delimitMate
vim-bbye
ansible-vim
# ui
dressing-nvim
# session handling
project-nvim
auto-session
2022-12-07 14:11:38 +00:00
nvim-treesitter.withAllGrammars
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
registers-nvim
2022-08-05 12:25:44 +00:00
pre-commit-nvim
2023-04-11 05:40:34 +00:00
vim-surround
2023-04-12 07:57:29 +00:00
editorconfig-nvim
# git
gitsigns-nvim
vim-fugitive
2023-01-25 09:43:54 +00:00
vim-flog
git-blame-nvim
2022-09-19 05:52:06 +00:00
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
rust-tools-nvim
2022-12-07 14:11:38 +00:00
neodev-nvim
null-ls-nvim
2022-07-25 06:48:10 +00:00
lsp_lines-nvim
2022-08-23 09:46:14 +00:00
# debugging
nvim-dap
nvim-dap-ui
];
extraConfig = ''
lua << EOF
2022-09-26 05:50:10 +00:00
vim.o.guifont = "DejaVu Sans Mono:h10"
2022-07-13 14:01:34 +00:00
if vim.g.neovide then
vim.g.neovide_fullscreen = true
2022-07-13 14:01:34 +00:00
vim.g.neovide_cursor_animation_length = 0.01
vim.g.neovide_cursor_trail_length = 0.01
end
${builtins.readFile ./keymaps.lua }
${builtins.readFile ./options.lua }
2023-05-11 06:21:13 +00:00
${builtins.readFile ./commands.lua }
${builtins.readFile ./treesitter.lua }
${builtins.readFile ./lspconfig.lua }
2023-06-27 08:15:04 +00:00
${builtins.readFile ./auto-session.lua }
${builtins.readFile ./toggleterm.lua }
${builtins.readFile ./notify.lua }
${builtins.readFile ./comment.lua }
${builtins.readFile ./lualine.lua }
${builtins.readFile ./tabline.lua }
${builtins.readFile ./indent-blankline.lua }
${builtins.readFile ./gitsigns.lua }
${builtins.readFile ./luasnip.lua }
${builtins.readFile ./nvim-cmp.lua }
${builtins.readFile ./telescope.lua }
2022-08-18 19:15:03 +00:00
${builtins.readFile ./themes.lua }
2022-08-18 19:15:03 +00:00
vim.opt.background = '${theme}'
${builtins.readFile ./project-nvim.lua }
2022-08-23 09:46:14 +00:00
${builtins.readFile ./dap.lua }
vim.g.gitblame_date_format = "%r"
EOF
'';
};
};
}
2022-08-05 12:25:44 +00:00