This commit is contained in:
2025-12-11 17:17:21 +01:00
commit 3add673455
43 changed files with 2799 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
local options = {
formatters_by_ft = {
lua = { "stylua" },
rust = { "rustfmt" },
-- css = { "prettier" },
-- html = { "prettier" },
},
-- format_on_save = {
-- -- These options will be passed to conform.format()
-- timeout_ms = 500,
-- lsp_fallback = true,
-- },
}
return options

47
nvim/lua/configs/lazy.lua Normal file
View File

@@ -0,0 +1,47 @@
return {
defaults = { lazy = true },
install = { colorscheme = { "nvchad" } },
ui = {
icons = {
ft = "",
lazy = "󰂠 ",
loaded = "",
not_loaded = "",
},
},
performance = {
rtp = {
disabled_plugins = {
"2html_plugin",
"tohtml",
"getscript",
"getscriptPlugin",
"gzip",
"logipat",
"netrw",
"netrwPlugin",
"netrwSettings",
"netrwFileHandlers",
"matchit",
"tar",
"tarPlugin",
"rrhelper",
"spellfile_plugin",
"vimball",
"vimballPlugin",
"zip",
"zipPlugin",
"tutor",
"rplugin",
"syntax",
"synmenu",
"optwin",
"compiler",
"bugreport",
"ftplugin",
},
},
},
}

View File

@@ -0,0 +1,34 @@
require("nvchad.configs.lspconfig").defaults()
local servers = { "html", "cssls", "rust_analyzer" }
vim.lsp.enable(servers)
-- Configure rust-analyzer with enhanced settings
vim.lsp.config.rust_analyzer = {
cmd = { "rust-analyzer" },
filetypes = { "rust" },
root_markers = { "Cargo.toml", "rust-project.json" },
settings = {
["rust-analyzer"] = {
cargo = {
allFeatures = true,
loadOutDirsFromCheck = true,
buildScripts = {
enable = true,
},
},
checkOnSave = true,
check = {
command = "clippy",
},
procMacro = {
enable = true,
},
diagnostics = {
enable = true,
},
},
},
}
-- read :h vim.lsp.config for changing options of lsp servers