comit
This commit is contained in:
+1
-16
@@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -393,6 +393,63 @@
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
# LSP
|
||||
{
|
||||
action = "<cmd>lua vim.lsp.buf.definition()<cr>";
|
||||
key = "gd";
|
||||
options = { silent = true; desc = "Go to definition"; };
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua vim.lsp.buf.declaration()<cr>";
|
||||
key = "gD";
|
||||
options = { silent = true; desc = "Go to declaration"; };
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua vim.lsp.buf.implementation()<cr>";
|
||||
key = "gi";
|
||||
options = { silent = true; desc = "Go to implementation"; };
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua vim.lsp.buf.type_definition()<cr>";
|
||||
key = "<leader>D";
|
||||
options = { silent = true; desc = "Go to type definition"; };
|
||||
}
|
||||
{
|
||||
action = "<cmd>Telescope lsp_references<cr>";
|
||||
key = "gr";
|
||||
options = { silent = true; desc = "LSP references"; };
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua vim.lsp.buf.hover()<cr>";
|
||||
key = "K";
|
||||
options = { silent = true; desc = "Hover docs"; };
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua vim.lsp.buf.signature_help()<cr>";
|
||||
key = "<C-k>";
|
||||
mode = ["n" "i"];
|
||||
options = { silent = true; desc = "Signature help"; };
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua vim.lsp.buf.rename()<cr>";
|
||||
key = "<leader>rn";
|
||||
options = { silent = true; desc = "Rename symbol"; };
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua vim.diagnostic.goto_prev()<cr>";
|
||||
key = "[d";
|
||||
options = { silent = true; desc = "Previous diagnostic"; };
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua vim.diagnostic.goto_next()<cr>";
|
||||
key = "]d";
|
||||
options = { silent = true; desc = "Next diagnostic"; };
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua vim.diagnostic.open_float()<cr>";
|
||||
key = "<leader>e";
|
||||
options = { silent = true; desc = "Show diagnostic float"; };
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user