From 1348574a13b39b415efb65e50dd371112a2a7fc0 Mon Sep 17 00:00:00 2001 From: Pratik Tripathy Date: Thu, 12 Jun 2025 13:11:20 +0530 Subject: [PATCH] feat(nvim): Quality of life config changes - Blink.nvim: Fall back to default keymaps - blink.nvim: Remove codium from sources - lsp: Enable inlay hints by default - keymap: -> Evaluate highlighted text & paste result at end --- .../.config/nvim/lua/plugins/code-completion.lua | 16 ++++++++-------- common/.config/nvim/lua/plugins/code-lsp.lua | 3 ++- common/.vim/key_maps.vim | 3 +++ 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/common/.config/nvim/lua/plugins/code-completion.lua b/common/.config/nvim/lua/plugins/code-completion.lua index 3bfbe10..9728c99 100644 --- a/common/.config/nvim/lua/plugins/code-completion.lua +++ b/common/.config/nvim/lua/plugins/code-completion.lua @@ -30,7 +30,7 @@ return { -- 'none' - create all the mappings yourself keymap = { preset = "none", - [""] = { "accept", "fallback" }, -- Ctrl + Enter to accept + [""] = { "accept", "fallback" }, -- Ctrl + Enter to accept [""] = { "hide", "fallback" }, -- Ctrl + x to reject [""] = { "snippet_forward", "fallback" }, @@ -52,7 +52,7 @@ return { completion = { keyword = { range = "full" }, - accept = { auto_brackets = { enabled = false } }, + accept = { auto_brackets = { enabled = true } }, menu = { border = "rounded", draw = { @@ -116,7 +116,7 @@ return { "buffer", "path", "snippets", - "codeium", + -- "codeium", }, per_filetype = { sql = { "snippets", "dadbod", "buffer" }, @@ -125,11 +125,11 @@ return { }, providers = { - codeium = { - name = "codeium", -- Cause it's registered on nvim-cmp as "codeium" - module = "blink.compat.source", - score_offset = 600, - }, + -- codeium = { + -- name = "codeium", -- Cause it's registered on nvim-cmp as "codeium" + -- module = "blink.compat.source", + -- score_offset = 600, + -- }, conventional_commits = { name = "Conventional Commits", module = "blink-cmp-conventional-commits", diff --git a/common/.config/nvim/lua/plugins/code-lsp.lua b/common/.config/nvim/lua/plugins/code-lsp.lua index e8367b0..97e9e0a 100644 --- a/common/.config/nvim/lua/plugins/code-lsp.lua +++ b/common/.config/nvim/lua/plugins/code-lsp.lua @@ -85,8 +85,9 @@ return { }) end + -- Native lsp inline virtual text / inlay hints if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then - -- vim.lsp.inlay_hint.enable() + vim.lsp.inlay_hint.enable() -- enabled by default map("cI", function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = event.buf })) diff --git a/common/.vim/key_maps.vim b/common/.vim/key_maps.vim index b9d4355..a0843c3 100644 --- a/common/.vim/key_maps.vim +++ b/common/.vim/key_maps.vim @@ -100,6 +100,9 @@ nnoremap :m .-2== vnoremap :m '>+1gv=gv vnoremap :m '<-2gv=gv +" Evaluate expression of the highlighted text and paste at the end +vnoremap = y`]a = =" + " Insert mode: add undo points on "," & "." & ";" imap , ,u imap . .u