mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 08:41:43 +05:30
feat(neovim-rust): Rust LSP, debugging, testing and keymaps
- `rustaceanvim` for LSP config - Rust ft specific keymaps in `after/ftplugin` - `nvim-dap` for Rust debugging with codelldb - `rustaceanvim.neotest` for Rust testing - `rcasia/neotest-bash` for Bash testing - Better keymaps for running tests - Inlay hint UI improvements
This commit is contained in:
@@ -58,12 +58,60 @@ return {
|
||||
},
|
||||
},
|
||||
|
||||
-- NeoVim
|
||||
{ "folke/lazydev.nvim", ft = "lua" },
|
||||
|
||||
-- Rust
|
||||
{
|
||||
"mrcjkb/rustaceanvim",
|
||||
version = "^6",
|
||||
config = function()
|
||||
vim.g.rusteceanvim = {
|
||||
lazy = false,
|
||||
init = function()
|
||||
vim.g.rustaceanvim = {
|
||||
server = {
|
||||
-- Keymaps in ../../after/ftplugin/rust.lua
|
||||
|
||||
-- LSP configuration
|
||||
default_settings = {
|
||||
["rust-analyzer"] = {
|
||||
cargo = { allFeatures = true },
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
enableExperimental = true,
|
||||
},
|
||||
completion = {
|
||||
addCallArgumentSnippets = true,
|
||||
addCallParenthesis = true,
|
||||
postfix = { enable = true },
|
||||
autoimport = { enable = true },
|
||||
},
|
||||
},
|
||||
inlayHints = {
|
||||
bindingModeHints = { enable = false },
|
||||
chainingHints = { enable = true },
|
||||
closingBraceHints = { enable = true, minLines = 25 },
|
||||
closureReturnTypeHints = { enable = "never" },
|
||||
lifetimeElisionHints = { enable = "never", useParameterNames = false },
|
||||
maxLength = 25,
|
||||
parameterHints = { enable = true },
|
||||
reborrowHints = { enable = "never" },
|
||||
renderColons = true,
|
||||
typeHints = {
|
||||
enable = true,
|
||||
hideClosureInitialization = false,
|
||||
hideNamedConstructor = false,
|
||||
},
|
||||
},
|
||||
procMacro = {
|
||||
enable = true,
|
||||
ignored = {
|
||||
["async-trait"] = { "async_trait" },
|
||||
["napi-derive"] = { "napi" },
|
||||
["async-recursion"] = { "async_recursion" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
dap = {
|
||||
adapter = {
|
||||
type = "executable",
|
||||
|
||||
Reference in New Issue
Block a user