diff --git a/modules/home/nixvim/keymaps.nix b/modules/home/nixvim/keymaps.nix index 7606652..a804f53 100644 --- a/modules/home/nixvim/keymaps.nix +++ b/modules/home/nixvim/keymaps.nix @@ -21,8 +21,8 @@ in { programs.nixvim.keymaps = [ # LSP (mkRaw "K" "vim.lsp.buf.hover" "LSPエラーのホバー表示") - (mkRaw "gd" "vim.lsp.buf.definition" "定義へ移動") - (mkRaw "gr" "vim.lsp.buf.references" "参照を表示") + (mk "gd" "Glance definitions" "定義へ移動") + (mk "gr" "Glance references" "参照を表示") (mkRaw "rn" "vim.lsp.buf.rename" "シンボル名を一括変換") (mkRaw "cf" "function() require('conform').format({ timeout_ms = 1000, lsp_format = 'fallback' }) end" "コードをフォーマット") (mkRaw "ca" "function() vim.lsp.buf.code_action({ context = { diagnostics = vim.diagnostic.get(0, { lnum = vim.fn.line('.') - 1 }) } }) end" "コードアクション") diff --git a/modules/home/nixvim/plugins/editor/default.nix b/modules/home/nixvim/plugins/editor/default.nix index 6cc090b..992d7be 100644 --- a/modules/home/nixvim/plugins/editor/default.nix +++ b/modules/home/nixvim/plugins/editor/default.nix @@ -12,5 +12,6 @@ ./conform.nix ./surround.nix ./git.nix + ./glance.nix ]; } diff --git a/modules/home/nixvim/plugins/editor/glance.nix b/modules/home/nixvim/plugins/editor/glance.nix new file mode 100644 index 0000000..d5b6c24 --- /dev/null +++ b/modules/home/nixvim/plugins/editor/glance.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: { + programs.nixvim = { + extraPlugins = [ pkgs.vimPlugins.glance-nvim ]; + extraConfigLua = '' + require("glance").setup() + ''; + }; +}