nixos-configs/nixos/home/nvim.nix

117 lines
2.6 KiB
Nix
Raw Normal View History

{ pkgs, lib, ... }: let
2023-07-19 21:52:35 -04:00
# installs a vim plugin from git with a given tag / branch
plugin = owner: repo: rev: hash: pkgs.vimUtils.buildVimPlugin {
2023-07-19 21:52:35 -04:00
pname = "${lib.strings.sanitizeDerivationName repo}";
version = rev;
src = pkgs.fetchFromGitHub {
inherit rev owner repo hash;
2023-07-19 21:52:35 -04:00
};
};
in
{
2023-09-19 23:23:19 -04:00
xdg.configFile = {
"../.gradle/gradle.properties".source = pkgs.writeText "gradle.properties" ''
org.gradle.java.home = ${pkgs.temurin-bin-17}
'';
};
2023-07-19 21:52:35 -04:00
programs.neovim = {
enable = true;
2023-10-07 22:07:13 -04:00
viAlias = true;
vimAlias = true;
2023-07-19 21:52:35 -04:00
package = pkgs.neovim-nightly;
extraConfig = builtins.concatStringsSep "\n" [
(lib.strings.fileContents ../../config/nvim/base.vim)
2023-07-19 21:52:35 -04:00
''
lua << EOF
${lib.strings.fileContents ../../config/nvim/config.lua}
2023-07-19 21:52:35 -04:00
EOF
''
];
extraPackages = with pkgs; [
tree-sitter
nodejs_latest
2023-09-19 23:23:19 -04:00
gradle
bat
python311Packages.pylint
2023-09-19 11:58:34 -04:00
nil
2023-07-19 21:52:35 -04:00
];
coc = {
enable = true;
settings = {
"colors.enable" = true;
"coc.preferences.formatOnType" = true;
"Lua.misc.parameters" = [
"--metapath"
"~/.cache/sumneko_lua/meta"
"--logpath"
"~/.cache/sumneko_lua/log"
];
"Lua.workspace.library" = [
"$\{3rd\}/luv/library"
];
sumneko-lua = {
serverDir = "${pkgs.lua-language-server}/share/lua-language-server";
enableNvimLuaDev = true;
};
2023-09-19 23:23:19 -04:00
"java.jdt.ls.java.home" = "${pkgs.temurin-bin-17}";
"bashIde.shellcheckPath" = "${pkgs.shellcheck}/bin/shellcheck";
languageserver = {
nix = {
command = "nil";
filetypes = [ "nix" ];
rootPatterns = [ "flake.nix" ];
};
};
};
};
2023-07-19 21:52:35 -04:00
plugins = with pkgs.vimPlugins; [
vim-which-key
coc-java
coc-css
coc-sumneko-lua
coc-highlight
coc-json
coc-pyright
coc-sh
coc-snippets
coc-vimlsp
coc-yaml
coc-toml
coc-markdownlint
2023-09-19 11:51:02 -04:00
coc-tsserver
neodev-nvim
coc-fzf
fzfWrapper
fzf-vim
2023-07-19 21:52:35 -04:00
nvim-treesitter.withAllGrammars
nvim-treesitter
nvim-autopairs
2023-07-19 21:52:35 -04:00
dracula-nvim
(plugin "lukas-reineke"
"indent-blankline.nvim"
"0fe34b4c1b926e106d105d3ae88ef6cbf6743572"
"sha256-e8gn4pJYALaQ6sGA66SFf8p6VLJBPxT/BimQhOd5eBs=")
gitsigns-nvim
lualine-nvim
minimap-vim
2023-07-20 23:00:57 -04:00
neo-tree-nvim
2023-07-19 21:52:35 -04:00
2023-07-20 23:00:57 -04:00
# to explore more
fugitive
todo-comments-nvim
2023-07-19 21:52:35 -04:00
];
};
}