Skip to content

Commit 4ef71aa

Browse files
committed
fix: add inline hints and oil git status
Signed-off-by: Gamunu Balagalla <gamunu@fastcode.io>
1 parent 5e2438f commit 4ef71aa

3 files changed

Lines changed: 32 additions & 1 deletion

File tree

lua/coldboot/plugins/conform.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ return {
4747
terraform = { 'terraform_fmt' },
4848
hcl = { 'terraform_fmt' },
4949
dockerfile = { 'dockerfmt' },
50-
sql = { 'sqlformat' },
50+
sql = { 'sqlfluff' },
5151
xml = { 'xmlformat' },
5252
},
5353
-- Set up format-on-save

lua/coldboot/plugins/lsp.lua

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,17 @@ return {
2626
-- Setup neovim lua configuration
2727
require('neodev').setup()
2828

29+
local function enable_inlay_hints(client, bufnr)
30+
if not client or not client.server_capabilities or not client.server_capabilities.inlayHintProvider then
31+
return
32+
end
33+
if vim.lsp.inlay_hint and type(vim.lsp.inlay_hint) == 'table' and vim.lsp.inlay_hint.enable then
34+
vim.lsp.inlay_hint.enable(true, { bufnr = bufnr })
35+
elseif vim.lsp.buf and vim.lsp.buf.inlay_hint then
36+
vim.lsp.buf.inlay_hint(bufnr, true)
37+
end
38+
end
39+
2940
-- Global LSP keymaps via LspAttach (universal, recommended pattern)
3041
local lsp_keys_grp = vim.api.nvim_create_augroup('UserLspKeys', { clear = true })
3142
vim.api.nvim_create_autocmd('LspAttach', {
@@ -52,6 +63,8 @@ return {
5263
nmap('K', vim.lsp.buf.hover, 'Hover Documentation')
5364
nmap('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation')
5465
nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
66+
local client = args.data and vim.lsp.get_client_by_id(args.data.client_id) or nil
67+
enable_inlay_hints(client, bufnr)
5568
end,
5669
})
5770

@@ -87,6 +100,8 @@ return {
87100
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_)
88101
vim.lsp.buf.format()
89102
end, { desc = 'Format current buffer with LSP' })
103+
104+
enable_inlay_hints(client, bufnr)
90105
end
91106

92107
-- Enable the following language servers
@@ -168,4 +183,8 @@ return {
168183
}
169184
end,
170185
},
186+
{
187+
'qvalentin/helm-ls.nvim',
188+
ft = 'helm',
189+
},
171190
}

lua/coldboot/plugins/oil.lua

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ return {
1010
default_file_explorer = true,
1111
-- Send deleted files to the trash instead of permanently deleting them (:help oil-trash)
1212
delete_to_trash = true,
13+
-- Reserve space for git status indicators injected by oil-git-status.nvim
14+
win_options = {
15+
signcolumn = 'yes:2',
16+
},
17+
lsp_file_methods = {
18+
enabled = true,
19+
},
1320
view_options = {
1421
-- Show files and directories that start with "."
1522
show_hidden = true,
@@ -35,4 +42,9 @@ return {
3542
-- Optional dependencies
3643
dependencies = { 'nvim-tree/nvim-web-devicons' },
3744
},
45+
{
46+
'refractalize/oil-git-status.nvim',
47+
dependencies = { 'stevearc/oil.nvim' },
48+
config = true,
49+
},
3850
}

0 commit comments

Comments
 (0)