From 8ec7b3429f6fcf0933b05fa20cf6a7091553f004 Mon Sep 17 00:00:00 2001 From: Doloro1978 Date: Thu, 11 Jun 2026 00:07:50 +0100 Subject: [PATCH] comit --- config/modules/fish.nix | 17 +-------- config/modules/nixvim/default.nix | 57 +++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 16 deletions(-) diff --git a/config/modules/fish.nix b/config/modules/fish.nix index 748d936..1674841 100644 --- a/config/modules/fish.nix +++ b/config/modules/fish.nix @@ -14,8 +14,6 @@ homeManager = { pkgs, ... }: { - imports = [ inputs.direnv-instant.homeModules.direnv-instant ]; - programs.direnv-instant.enable = true; home.shell.enableFishIntegration = true; home.packages = [ pkgs.nix-output-monitor @@ -35,19 +33,6 @@ set -gx COLORTERM truecolor end ''; - interactiveShellInit = '' - # direnv-instant registers its hook on both fish_prompt and PWD, - # causing double execution on every cd. Re-register on PWD only. - functions --erase _direnv_hook - function _direnv_hook --on-variable PWD - set -gx DIRENV_INSTANT_SHELL fish - set -gx DIRENV_INSTANT_SHELL_PID $fish_pid - if test "$DIRENV_INSTANT_USE_CACHE" != 0 -a -n "$__DIRENV_INSTANT_ENV_FILE" -a -f "$__DIRENV_INSTANT_ENV_FILE" - source "$__DIRENV_INSTANT_ENV_FILE" - end - direnv-instant start | source - end - ''; plugins = [ { name = "bobthefish"; @@ -69,7 +54,7 @@ }; direnv = { enable = true; - enableFishIntegration = false; + enableFishIntegration = true; }; }; }; diff --git a/config/modules/nixvim/default.nix b/config/modules/nixvim/default.nix index c393818..fc6011a 100644 --- a/config/modules/nixvim/default.nix +++ b/config/modules/nixvim/default.nix @@ -393,6 +393,63 @@ silent = true; }; } + # LSP + { + action = "lua vim.lsp.buf.definition()"; + key = "gd"; + options = { silent = true; desc = "Go to definition"; }; + } + { + action = "lua vim.lsp.buf.declaration()"; + key = "gD"; + options = { silent = true; desc = "Go to declaration"; }; + } + { + action = "lua vim.lsp.buf.implementation()"; + key = "gi"; + options = { silent = true; desc = "Go to implementation"; }; + } + { + action = "lua vim.lsp.buf.type_definition()"; + key = "D"; + options = { silent = true; desc = "Go to type definition"; }; + } + { + action = "Telescope lsp_references"; + key = "gr"; + options = { silent = true; desc = "LSP references"; }; + } + { + action = "lua vim.lsp.buf.hover()"; + key = "K"; + options = { silent = true; desc = "Hover docs"; }; + } + { + action = "lua vim.lsp.buf.signature_help()"; + key = ""; + mode = ["n" "i"]; + options = { silent = true; desc = "Signature help"; }; + } + { + action = "lua vim.lsp.buf.rename()"; + key = "rn"; + options = { silent = true; desc = "Rename symbol"; }; + } + { + action = "lua vim.diagnostic.goto_prev()"; + key = "[d"; + options = { silent = true; desc = "Previous diagnostic"; }; + } + { + action = "lua vim.diagnostic.goto_next()"; + key = "]d"; + options = { silent = true; desc = "Next diagnostic"; }; + } + { + action = "lua vim.diagnostic.open_float()"; + key = "e"; + options = { silent = true; desc = "Show diagnostic float"; }; + } ]; }; };