mirror of
https://github.com/softinio/nix-config.git
synced 2025-10-19 03:26:40 -07:00
re-organize nixvim
This commit is contained in:
parent
7584b9ebfc
commit
10e3123b7f
22 changed files with 480 additions and 219 deletions
43
programs/nixvim/plugins/lsp/keymaps.nix
Normal file
43
programs/nixvim/plugins/lsp/keymaps.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.nixvim.lsp.keymaps = [
|
||||
# Diagnostics navigation
|
||||
{
|
||||
key = "<leader>k";
|
||||
action.__raw = "function() vim.diagnostic.jump({ count=-1, float=true }) end";
|
||||
}
|
||||
{
|
||||
key = "<leader>j";
|
||||
action.__raw = "function() vim.diagnostic.jump({ count=1, float=true }) end";
|
||||
}
|
||||
|
||||
# LSP navigation
|
||||
{
|
||||
key = "gd";
|
||||
lspBufAction = "definition";
|
||||
}
|
||||
{
|
||||
key = "gD";
|
||||
lspBufAction = "references";
|
||||
}
|
||||
{
|
||||
key = "gt";
|
||||
lspBufAction = "type_definition";
|
||||
}
|
||||
{
|
||||
key = "gi";
|
||||
lspBufAction = "implementation";
|
||||
}
|
||||
|
||||
# Documentation and refactoring
|
||||
{
|
||||
key = "K";
|
||||
lspBufAction = "hover";
|
||||
}
|
||||
{
|
||||
key = "<F2>";
|
||||
lspBufAction = "rename";
|
||||
}
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue