2023-10-15 14:30:30 -04:00
|
|
|
# Home-manager module
|
|
|
|
|
2023-10-03 11:08:56 -04:00
|
|
|
{ pkgs, lib, ... }: let
|
2023-07-19 21:52:35 -04:00
|
|
|
# installs a vim plugin from git with a given tag / branch
|
2023-10-01 23:27:59 -04:00
|
|
|
plugin = owner: repo: rev: hash: pkgs.vimUtils.buildVimPlugin {
|
2023-07-19 21:52:35 -04:00
|
|
|
pname = "${lib.strings.sanitizeDerivationName repo}";
|
2023-09-30 02:09:14 -04:00
|
|
|
version = rev;
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
inherit rev owner repo hash;
|
2023-07-19 21:52:35 -04:00
|
|
|
};
|
|
|
|
};
|
2023-09-30 02:09:14 -04:00
|
|
|
in
|
2023-10-03 11:08:56 -04:00
|
|
|
|
2023-09-30 02:09:14 -04:00
|
|
|
{
|
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-10-22 15:35:25 -04:00
|
|
|
home.packages = with pkgs; [
|
|
|
|
gradle
|
|
|
|
gradle-completion # FIXME: not working
|
|
|
|
];
|
|
|
|
|
2023-10-15 15:11:59 -04:00
|
|
|
programs = {
|
|
|
|
|
|
|
|
java = {
|
2023-09-19 12:54:00 -04:00
|
|
|
enable = true;
|
2023-10-15 15:11:59 -04:00
|
|
|
package = pkgs.temurin-bin-17;
|
|
|
|
};
|
|
|
|
|
|
|
|
neovim = {
|
|
|
|
enable = true;
|
2023-10-26 16:33:40 -04:00
|
|
|
package = pkgs.neovim-nightly;
|
|
|
|
withNodeJs = true;
|
|
|
|
withPython3 = true;
|
|
|
|
withRuby = false;
|
|
|
|
|
2023-10-26 00:35:24 -04:00
|
|
|
defaultEditor = true;
|
2023-10-15 15:11:59 -04:00
|
|
|
viAlias = true;
|
|
|
|
vimAlias = true;
|
|
|
|
|
2023-10-26 00:35:24 -04:00
|
|
|
extraConfig = with lib.strings; ''
|
|
|
|
${fileContents ./config/base.vim}
|
|
|
|
'';
|
|
|
|
|
|
|
|
extraLuaConfig = with lib.strings; ''
|
|
|
|
${fileContents ./config/config.lua}
|
|
|
|
'';
|
2023-10-15 15:11:59 -04:00
|
|
|
|
|
|
|
extraPackages = with pkgs; [
|
|
|
|
nodejs_latest
|
2023-10-26 00:35:24 -04:00
|
|
|
nodePackages.npm
|
|
|
|
nodePackages.neovim
|
2023-10-15 15:11:59 -04:00
|
|
|
gradle
|
2023-10-26 00:35:24 -04:00
|
|
|
|
2023-10-15 15:11:59 -04:00
|
|
|
bat
|
|
|
|
|
2023-10-26 16:33:40 -04:00
|
|
|
stylelint-lsp
|
2023-10-15 15:11:59 -04:00
|
|
|
nil
|
|
|
|
];
|
2023-10-26 00:35:24 -04:00
|
|
|
extraPython3Packages = with pkgs.python311Packages; [
|
|
|
|
pylint
|
|
|
|
];
|
2023-10-15 15:11:59 -04:00
|
|
|
|
|
|
|
coc = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
2023-10-26 16:33:40 -04:00
|
|
|
# General
|
2023-10-15 15:11:59 -04:00
|
|
|
"colors.enable" = true;
|
|
|
|
"coc.preferences.formatOnType" = true;
|
2023-10-26 00:35:24 -04:00
|
|
|
"inlayHint.enable" = false;
|
2023-10-20 21:06:44 -04:00
|
|
|
|
2023-10-26 16:33:40 -04:00
|
|
|
# Eslint
|
2023-10-20 17:46:00 -04:00
|
|
|
"eslint.format.enable" = true;
|
2023-10-20 21:06:44 -04:00
|
|
|
"eslint.autoFixOnSave" = true;
|
2023-10-26 16:33:40 -04:00
|
|
|
|
|
|
|
# Stylelint FIXME: not working
|
|
|
|
"stylelintplus.enable" = true;
|
|
|
|
"stylelintplus.cssInJs" = true;
|
|
|
|
"stylelintplus.autoFixOnSave" = true;
|
2023-10-20 21:06:44 -04:00
|
|
|
"stylelintplus.autoFixOnFormat" = true;
|
|
|
|
"css.validate" = false;
|
|
|
|
"less.validate" = false;
|
|
|
|
"scss.validate" = false;
|
|
|
|
"wxss.validate" = false;
|
|
|
|
|
2023-10-26 16:33:40 -04:00
|
|
|
# Lua lsp
|
2023-10-15 15:11:59 -04:00
|
|
|
"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-10-20 21:06:44 -04:00
|
|
|
|
2023-10-26 16:33:40 -04:00
|
|
|
# Nix
|
2023-10-15 15:11:59 -04:00
|
|
|
languageserver = {
|
|
|
|
nix = {
|
|
|
|
command = "nil";
|
|
|
|
filetypes = [ "nix" ];
|
|
|
|
rootPatterns = [ "flake.nix" ];
|
|
|
|
};
|
2023-09-19 12:54:00 -04:00
|
|
|
};
|
2023-10-26 16:33:40 -04:00
|
|
|
|
|
|
|
# Misc
|
|
|
|
"java.jdt.ls.java.home" = "${pkgs.temurin-bin-17}";
|
|
|
|
"bashIde.shellcheckPath" = "${pkgs.shellcheck}/bin/shellcheck";
|
2023-09-19 12:54:00 -04:00
|
|
|
};
|
|
|
|
};
|
2023-10-03 11:08:56 -04:00
|
|
|
|
2023-10-15 15:11:59 -04:00
|
|
|
plugins = with pkgs.vimPlugins; [
|
|
|
|
vim-which-key
|
|
|
|
|
|
|
|
coc-java
|
|
|
|
coc-css
|
2023-10-26 16:33:40 -04:00
|
|
|
|
|
|
|
# Lua
|
2023-10-15 15:11:59 -04:00
|
|
|
coc-sumneko-lua
|
2023-10-26 16:33:40 -04:00
|
|
|
neodev-nvim
|
|
|
|
|
2023-10-15 15:11:59 -04:00
|
|
|
coc-highlight
|
|
|
|
coc-json
|
|
|
|
coc-pyright
|
|
|
|
coc-sh
|
|
|
|
coc-snippets
|
|
|
|
coc-vimlsp
|
|
|
|
coc-yaml
|
|
|
|
coc-toml
|
|
|
|
coc-markdownlint
|
|
|
|
coc-tsserver
|
2023-10-20 17:46:00 -04:00
|
|
|
coc-eslint
|
2023-10-26 16:33:40 -04:00
|
|
|
coc-stylelintplus
|
2023-10-15 15:11:59 -04:00
|
|
|
|
|
|
|
coc-fzf
|
|
|
|
fzfWrapper
|
|
|
|
fzf-vim
|
|
|
|
|
|
|
|
nvim-treesitter
|
2023-10-26 00:35:24 -04:00
|
|
|
nvim-treesitter.withAllGrammars
|
2023-10-15 15:11:59 -04:00
|
|
|
nvim-autopairs
|
|
|
|
|
|
|
|
dracula-nvim
|
|
|
|
(plugin "lukas-reineke"
|
|
|
|
"indent-blankline.nvim"
|
2023-10-26 00:35:24 -04:00
|
|
|
"046e2cf04e08ece927bacbfb87c5b35c0b636546"
|
|
|
|
"sha256-bhoep8aTYje5K/dZ/XmpwBPn4PBEMPrmw33QJdfFe6M=")
|
2023-10-15 15:11:59 -04:00
|
|
|
gitsigns-nvim
|
|
|
|
lualine-nvim
|
2023-10-22 04:14:22 -04:00
|
|
|
(plugin "echasnovski"
|
|
|
|
"mini.map"
|
|
|
|
"75b7ca9443e17c852b24055b32f74a880cf48053"
|
|
|
|
"sha256-CoMc6yQXXAW1wzcD9eJGuM+kcOJghuwHjKrqEMxZBec=")
|
2023-10-15 15:11:59 -04:00
|
|
|
|
|
|
|
neo-tree-nvim
|
|
|
|
|
|
|
|
# to explore more
|
|
|
|
fugitive
|
|
|
|
todo-comments-nvim
|
|
|
|
];
|
|
|
|
};
|
2023-07-19 21:52:35 -04:00
|
|
|
};
|
|
|
|
}
|