Adjusting nim lsp
This commit is contained in:
29
CLAUDE.md
29
CLAUDE.md
@@ -15,6 +15,12 @@ This is a Neovim configuration written in Lua using Neovim's native package mana
|
||||
- `lsp.lua` - LSP configuration (lua_ls, gopls) with lsp_signature
|
||||
- `completion.lua` - nvim-cmp completion setup
|
||||
- `treesitter.lua` - Treesitter configuration
|
||||
- `autocmds.lua` - Auto commands and event handling
|
||||
- `diagnostics.lua` - LSP diagnostics configuration
|
||||
- `telescope_configuration.lua` - Telescope picker configuration
|
||||
- `terminal.lua` - Terminal and toggleterm setup
|
||||
- `vimwiki.lua` - Vimwiki configuration
|
||||
- `functions.lua` - Custom utility functions
|
||||
- `utils/` - Utility functions and overrides
|
||||
- `t3_functions.lua` - Custom functions for file finding, note capture, and navigation
|
||||
- `t3_overrides.lua` - Custom overrides
|
||||
@@ -24,9 +30,13 @@ This is a Neovim configuration written in Lua using Neovim's native package mana
|
||||
- **Multi-host theming**: Different TokyoNight themes based on hostname (xps13 uses "moon", Titan uses "storm")
|
||||
- **TTY compatibility**: Automatic fallback to console-friendly themes and no icons when running in Linux console
|
||||
- **Dual picker system**: Uses both FzfLua and Mini.pick for different workflows
|
||||
- **Triple picker integration**: FzfLua, Mini.pick, and Telescope for comprehensive file/buffer navigation
|
||||
- **Comprehensive key bindings**: Leader-based, Meta-X (Emacs-style), Ctrl-X, and function keys
|
||||
- **Claude Code integration**: Built-in support with dedicated keymaps under `<leader>a`
|
||||
- **AI integration**: Both Claude Code and Avante plugins for AI-assisted development
|
||||
- **Task management**: TaskWarrior integration with dedicated keymaps
|
||||
- **Terminal integration**: ToggleTerm and tmux navigation support
|
||||
- **Note-taking workflow**: Custom functions for capturing notes and snippets
|
||||
- **Advanced buffer management**: Barbar for visual buffer tabs with Alt+number navigation
|
||||
|
||||
### Plugin Management
|
||||
Uses Neovim's native package manager (`vim.pack.add`). No external package manager like lazy.nvim or packer.nvim is used.
|
||||
@@ -58,6 +68,9 @@ This configuration doesn't have traditional build/test commands as it's a Neovim
|
||||
### Custom Functions
|
||||
- `:NeorgCapture` - Capture notes using the custom note-taking workflow
|
||||
- `:CaptureSnip` - Capture code snippets for LuaSnip
|
||||
- `:TWEditTask`, `:TWView`, `:TWUpdateCurrent`, `:TWSyncTasks`, `:TWToggle` - TaskWarrior task management
|
||||
- `:UndotreeToggle` - Visual undo tree navigation
|
||||
- `:Ranger`, `:RangerNewTab` - File manager integration
|
||||
- Various `t3_*` functions for file navigation and workflows
|
||||
|
||||
## Important Conventions
|
||||
@@ -76,4 +89,16 @@ This configuration doesn't have traditional build/test commands as it's a Neovim
|
||||
The config detects hostname and adjusts theming accordingly. When adding host-specific features, follow the pattern in `init.lua` lines 17-45.
|
||||
|
||||
### TTY Compatibility
|
||||
The configuration automatically detects TTY environments and disables icons/complex UI elements. When adding new UI features, consider TTY fallbacks.
|
||||
The configuration automatically detects TTY environments and disables icons/complex UI elements. When adding new UI features, consider TTY fallbacks.
|
||||
|
||||
### Key Binding Categories
|
||||
- **Leader mappings** (`<leader>`): Organized with clear prefixes (`<leader>f` for files, `<leader>g` for grep, `<leader>G` for git, `<leader>a` for AI)
|
||||
- **Alt mappings**: Buffer/tab navigation (`Alt+1-9` for buffer jumping, `Alt+Left/Right` for buffer cycling)
|
||||
- **Meta-X mappings** (`<M-x>`): Emacs-style command palette using Telescope
|
||||
- **Ctrl-X mappings** (`<C-x>`): Alternative workflows using Mini.pick and TaskWarrior
|
||||
- **Function keys**: Direct access to tools (F2 for UndoTree, F3 for Ranger, F9 for grep, F11/F12 for spell/wrap toggle)
|
||||
|
||||
### AI Integration
|
||||
- **Claude Code**: Primary AI assistant with keymaps under `<leader>a` for chat, diff management, and file operations
|
||||
- **Avante**: Secondary AI integration (currently configured for Copilot provider)
|
||||
- **GitHub Copilot**: Code completion integration via copilot.vim
|
||||
18
lua/lsp.lua
18
lua/lsp.lua
@@ -28,7 +28,23 @@ vim.lsp.enable('gopls', {
|
||||
},
|
||||
},
|
||||
})
|
||||
vim.lsp.enable('nimlsp')
|
||||
-- Configure nimlangserver
|
||||
local lspconfig = require('lspconfig')
|
||||
lspconfig.nim_langserver.setup({
|
||||
cmd = { "nimlangserver" },
|
||||
filetypes = { "nim" },
|
||||
root_dir = function(fname)
|
||||
return lspconfig.util.find_git_ancestor(fname) or
|
||||
lspconfig.util.find_node_modules_ancestor(fname) or
|
||||
lspconfig.util.path.dirname(fname)
|
||||
end,
|
||||
settings = {
|
||||
nim = {
|
||||
nimsuggestPath = "nimsuggest",
|
||||
nimprettyPath = "nimpretty",
|
||||
}
|
||||
},
|
||||
})
|
||||
require("lsp_signature").setup({
|
||||
debug = false,
|
||||
bind = true, -- registers signature handler
|
||||
|
||||
Reference in New Issue
Block a user