From 4ef71aaff2e39f15508d411bdadbd19a38ebb721 Mon Sep 17 00:00:00 2001 From: Gamunu Balagalla Date: Mon, 15 Dec 2025 20:36:03 +0530 Subject: [PATCH] fix: add inline hints and oil git status Signed-off-by: Gamunu Balagalla --- lua/coldboot/plugins/conform.lua | 2 +- lua/coldboot/plugins/lsp.lua | 19 +++++++++++++++++++ lua/coldboot/plugins/oil.lua | 12 ++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/lua/coldboot/plugins/conform.lua b/lua/coldboot/plugins/conform.lua index b0b3022..be906fe 100644 --- a/lua/coldboot/plugins/conform.lua +++ b/lua/coldboot/plugins/conform.lua @@ -47,7 +47,7 @@ return { terraform = { 'terraform_fmt' }, hcl = { 'terraform_fmt' }, dockerfile = { 'dockerfmt' }, - sql = { 'sqlformat' }, + sql = { 'sqlfluff' }, xml = { 'xmlformat' }, }, -- Set up format-on-save diff --git a/lua/coldboot/plugins/lsp.lua b/lua/coldboot/plugins/lsp.lua index eaa9feb..ac917f6 100644 --- a/lua/coldboot/plugins/lsp.lua +++ b/lua/coldboot/plugins/lsp.lua @@ -26,6 +26,17 @@ return { -- Setup neovim lua configuration require('neodev').setup() + local function enable_inlay_hints(client, bufnr) + if not client or not client.server_capabilities or not client.server_capabilities.inlayHintProvider then + return + end + if vim.lsp.inlay_hint and type(vim.lsp.inlay_hint) == 'table' and vim.lsp.inlay_hint.enable then + vim.lsp.inlay_hint.enable(true, { bufnr = bufnr }) + elseif vim.lsp.buf and vim.lsp.buf.inlay_hint then + vim.lsp.buf.inlay_hint(bufnr, true) + end + end + -- Global LSP keymaps via LspAttach (universal, recommended pattern) local lsp_keys_grp = vim.api.nvim_create_augroup('UserLspKeys', { clear = true }) vim.api.nvim_create_autocmd('LspAttach', { @@ -52,6 +63,8 @@ return { nmap('K', vim.lsp.buf.hover, 'Hover Documentation') nmap('', vim.lsp.buf.signature_help, 'Signature Documentation') nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') + local client = args.data and vim.lsp.get_client_by_id(args.data.client_id) or nil + enable_inlay_hints(client, bufnr) end, }) @@ -87,6 +100,8 @@ return { vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_) vim.lsp.buf.format() end, { desc = 'Format current buffer with LSP' }) + + enable_inlay_hints(client, bufnr) end -- Enable the following language servers @@ -168,4 +183,8 @@ return { } end, }, + { + 'qvalentin/helm-ls.nvim', + ft = 'helm', + }, } diff --git a/lua/coldboot/plugins/oil.lua b/lua/coldboot/plugins/oil.lua index 20e35e3..7eedd32 100644 --- a/lua/coldboot/plugins/oil.lua +++ b/lua/coldboot/plugins/oil.lua @@ -10,6 +10,13 @@ return { default_file_explorer = true, -- Send deleted files to the trash instead of permanently deleting them (:help oil-trash) delete_to_trash = true, + -- Reserve space for git status indicators injected by oil-git-status.nvim + win_options = { + signcolumn = 'yes:2', + }, + lsp_file_methods = { + enabled = true, + }, view_options = { -- Show files and directories that start with "." show_hidden = true, @@ -35,4 +42,9 @@ return { -- Optional dependencies dependencies = { 'nvim-tree/nvim-web-devicons' }, }, + { + 'refractalize/oil-git-status.nvim', + dependencies = { 'stevearc/oil.nvim' }, + config = true, + }, }