Optimize Neovim configuration structure and LSP setup

- Remove duplicate nvim-web-devicons loading (already in kickstart)
- Add clangd configuration to custom LSP setup with proper flags
- Replace complex clangd_helper with universal LSP reload keybind (<leader>lr)
- Clean up unused clangd target selection keybind
- Streamline plugin organization for better maintainability

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
dlond 2025-07-26 19:56:13 +12:00
parent e9c3342170
commit 68f26dc50d
8 changed files with 48 additions and 140 deletions

View file

@ -1,10 +1,26 @@
-- [[ Basic Keymaps ]]
-- See `:help vim.keymap.set()`
-- Add any other general-purpose keymaps you want here
vim.keymap.set('n', '<leader>T', function()
require('custom.lsp.clangd'):pick_target()
end, { desc = 'Choose [T]arget' })
-- LSP reload function
local function reload_lsp()
local clients = vim.lsp.get_clients()
if #clients == 0 then
print('No LSP clients running')
return
end
for _, client in ipairs(clients) do
vim.lsp.stop_client(client.id)
end
vim.defer_fn(function()
vim.cmd('LspStart')
print('LSP servers reloaded')
end, 500)
end
-- Reload LSP keybind
vim.keymap.set('n', '<leader>lr', reload_lsp, { desc = '[L]SP [R]eload all servers' })
-- Standard practice for Lua modules that don't need to return complex data
return {}