Skip to content

Commit

Permalink
Nvim 0.10
Browse files Browse the repository at this point in the history
nvim-colorizer still requires termguicolors to be set:
norcalli/nvim-colorizer.lua#96

Still need to adjust for dynamic LSP capabilities.
  • Loading branch information
polyzen committed May 21, 2024
1 parent 078f235 commit c317eba
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
20 changes: 1 addition & 19 deletions base/.config/nvim/lua/lsp.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
-- Global mappings
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next)
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist)

vim.api.nvim_create_autocmd('LspAttach', {
Expand All @@ -26,9 +23,6 @@ vim.api.nvim_create_autocmd('LspAttach', {
local opts = { buffer = bufnr }
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
if capabilities.hoverProvider and client.name ~= 'null-ls' then
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
end
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts)
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, opts)
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, opts)
Expand Down Expand Up @@ -73,19 +67,7 @@ vim.api.nvim_create_autocmd('LspAttach', {
end,
})

vim.api.nvim_create_augroup('LspAttach_inlayhints', {})
vim.api.nvim_create_autocmd('LspAttach', {
group = 'LspAttach_inlayhints',
callback = function(args)
if not (args.data and args.data.client_id) then
return
end

local bufnr = args.buf
local client = vim.lsp.get_client_by_id(args.data.client_id)
require('lsp-inlayhints').on_attach(client, bufnr)
end,
})
vim.lsp.inlay_hint.enable()

local null_ls = require('null-ls')
local sources = {
Expand Down
4 changes: 0 additions & 4 deletions base/.config/nvim/lua/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,6 @@ require('lazy').setup({
autocmd = { enabled = true },
},
},
{
'lvimuser/lsp-inlayhints.nvim',
config = true,
},
{
'ray-x/lsp_signature.nvim',
config = true,
Expand Down

0 comments on commit c317eba

Please sign in to comment.