diff --git a/hm/desktop/browser/default.nix b/hm/desktop/browser/default.nix index 6aa7fef..68f0b3b 100644 --- a/hm/desktop/browser/default.nix +++ b/hm/desktop/browser/default.nix @@ -108,6 +108,7 @@ inv = invidious; nixos = "https://search.nixos.org/options?channel=${config.home.version.release}&query={}"; nixpkgs = "https://search.nixos.org/packages?channel=${config.home.version.release}&query={}"; + noogle = "https://noogle.dev/q?term={}"; npm = "https://www.npmjs.com/search?q={}"; os = nixos; pkgs = nixpkgs; diff --git a/hm/vim/default.nix b/hm/vim/default.nix index 7effdf5..1319381 100644 --- a/hm/vim/default.nix +++ b/hm/vim/default.nix @@ -52,9 +52,6 @@ gC = "commands"; gr = "lsp_references"; ge = "diagnostics"; - # ga = "lsp_code_actions"; - # gE = "lsp_workspace_diagnostics"; - # TODO Above makes nvim crash on startup, action is not provided gd = "lsp_definitions"; gs = "lsp_document_symbols"; }; @@ -83,10 +80,6 @@ undotree.enable = true; # Navigate edition history - # Git - fugitive.enable = true; # Git basics - gitsigns.enable = true; # Show changed lines in the gutter - }; extraPlugins = with pkgs.vimPlugins; [ # Search/replace @@ -96,19 +89,6 @@ # Surrounding pairs targets-vim # Better interaction with surrounding pairs - # Registers - registers-nvim # Show register content when pressing " - # TODO Doesn't work. Didn't work on Arch either - - # Tags - vim-gutentags # Generate tags - symbols-outline-nvim # Show a symbol panel on the right - # TODO Fails on startup. Same on Arch. Config issue? - - # Git - fugitive-gitlab-vim # Open files in GitLab - # TODO Connect it! - # Language-specific tcomment_vim # Language-aware (un)commenting ] ++ lib.optionals config.frogeye.extra [ @@ -129,9 +109,6 @@ command Reload source $MYVIMRC " PLUGINS - - " vim-gutentags - let g:gutentags_cache_dir = expand('~/.cache/nvim/tags') '' + lib.optionalString config.frogeye.extra '' " languagetool let g:languagetool_cmd = "${pkgs.languagetool}/bin/languagetool-commandline" @@ -189,6 +166,7 @@ ./code.nix ./completion.nix ./decoration.nix + ./git.nix ./lsp.nix ]; } diff --git a/hm/vim/git.nix b/hm/vim/git.nix new file mode 100644 index 0000000..ee7047c --- /dev/null +++ b/hm/vim/git.nix @@ -0,0 +1,26 @@ +{ pkgs, lib, config, ... }: +{ + config = { + programs.nixvim = { + extraConfigVim = '' + let g:fugitive_gitlab_domains = [${ + lib.strings.concatStringsSep ", " ( + map (d: "'${d}'") config.frogeye.vim.fugitive.gitlab_domains + )}] + ''; + extraPlugins = with pkgs.vimPlugins; [ + fugitive-gitlab-vim # Open files in GitLab + ]; + plugins = { + fugitive.enable = true; # Git basics + gitsigns.enable = true; # Show changed lines in the gutter + }; + }; + }; + options.frogeye.vim.fugitive = { + gitlab_domains = lib.mkOption { + default = { }; + type = lib.types.listOf lib.types.str; + }; + }; +}