feat(dev): add Rust toolchain and KDL language server support across editors
- Apps: Add `cargo` and `rustc` to user environment applications. - Neovim: Configure `kdl_lsp` for `.kdl` files and add `kdl` Tree-sitter parser. - Zed: Register `kdl` extension, configure `kdl-lsp` binary path lookup, and bind the KDL language server. Note: Since the kdl-lsp binary isn't packaged in Nixpkgs, it should be installed globally via cargo: `cargo install kdl-lsp`
This commit is contained in:
1 parent
cb7ea04d2f
commit
3f6a821dc6
4 files changed
+27
-2
No files matched your search
@@ -45,6 +45,10 @@ in
|
|||||||
ruff # Extremely fast Python linter and formatter
|
ruff # Extremely fast Python linter and formatter
|
||||||
mypy # Static type checker for Python
|
mypy # Static type checker for Python
|
||||||
|
|
||||||
|
# Rust Tooling
|
||||||
|
cargo # Rust package manager
|
||||||
|
rustc # Rust compiler
|
||||||
|
|
||||||
# Secrets Management
|
# Secrets Management
|
||||||
rbw # Unofficial command line client for Bitwarden
|
rbw # Unofficial command line client for Bitwarden
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -35,6 +35,15 @@ vim.lsp.enable('taplo')
|
|||||||
vim.lsp.config('marksman', {})
|
vim.lsp.config('marksman', {})
|
||||||
vim.lsp.enable('marksman')
|
vim.lsp.enable('marksman')
|
||||||
|
|
||||||
|
-- KDL LSP: kdl-lsp (KDL Language Server)
|
||||||
|
-- Note: Install the server using: cargo install kdl-lsp
|
||||||
|
vim.lsp.config('kdl_lsp', {
|
||||||
|
cmd = { 'kdl-lsp' },
|
||||||
|
filetypes = { 'kdl' },
|
||||||
|
root_markers = { '.git' },
|
||||||
|
})
|
||||||
|
vim.lsp.enable('kdl_lsp')
|
||||||
|
|
||||||
-- Configure LSP Keybindings and features on attach
|
-- Configure LSP Keybindings and features on attach
|
||||||
vim.api.nvim_create_autocmd('LspAttach', {
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
|
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
|
||||||
|
|||||||
@@ -10,7 +10,8 @@
|
|||||||
"proxy": "",
|
"proxy": "",
|
||||||
"disable_ai": true,
|
"disable_ai": true,
|
||||||
"auto_install_extensions": {
|
"auto_install_extensions": {
|
||||||
"github-theme": true
|
"github-theme": true,
|
||||||
|
"kdl": true
|
||||||
},
|
},
|
||||||
"project_panel": {
|
"project_panel": {
|
||||||
"hide_gitignore": false,
|
"hide_gitignore": false,
|
||||||
@@ -105,6 +106,11 @@
|
|||||||
"binary": {
|
"binary": {
|
||||||
"path_lookup": true
|
"path_lookup": true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"kdl-lsp": {
|
||||||
|
"binary": {
|
||||||
|
"path_lookup": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"languages": {
|
"languages": {
|
||||||
@@ -118,6 +124,11 @@
|
|||||||
"name": "ruff"
|
"name": "ruff"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"KDL": {
|
||||||
|
"language_servers": [
|
||||||
|
"kdl-lsp"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
config = builtins.readFile ./config/nvim/catppuccin.lua;
|
config = builtins.readFile ./config/nvim/catppuccin.lua;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Advanced Syntax Highlighting for developer workflows (Python, Rust, Java, Nix)
|
# Advanced Syntax Highlighting for developer workflows (Python, Rust, Java, Nix, KDL)
|
||||||
(nvim-treesitter.withPlugins (p: with p; [
|
(nvim-treesitter.withPlugins (p: with p; [
|
||||||
python
|
python
|
||||||
rust
|
rust
|
||||||
@@ -68,6 +68,7 @@
|
|||||||
java
|
java
|
||||||
javascript
|
javascript
|
||||||
markdown
|
markdown
|
||||||
|
kdl
|
||||||
]))
|
]))
|
||||||
|
|
||||||
# LSP Configuration & Python Language Servers
|
# LSP Configuration & Python Language Servers
|
||||||
|
|||||||
Reference in new issue
Block a user