Changed to nvchad
This commit is contained in:
27
config/nvim/lua/custom/configs/lspconfig.lua
Normal file
27
config/nvim/lua/custom/configs/lspconfig.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
local on_attach = require("plugins.configs.lspconfig").on_attach
|
||||
local capabilities = require("plugins.configs.lspconfig").capabilities
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
local util = require "lspconfig/util"
|
||||
local servers = { "html", "cssls", "clangd", "pyright"}
|
||||
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
end
|
||||
|
||||
lspconfig.rust_analyzer.setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
filetypes = {"rust"},
|
||||
root_dir = util.root_pattern("Cargo.toml"),
|
||||
settings = {
|
||||
['rust-analyzer'] = {
|
||||
cargo = {
|
||||
allFeatures = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
16
config/nvim/lua/custom/configs/null-ls.lua
Normal file
16
config/nvim/lua/custom/configs/null-ls.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
local null_ls = require "null-ls"
|
||||
|
||||
local formatting = null_ls.builtins.formatting
|
||||
local lint = null_ls.builtins.diagnostics
|
||||
|
||||
local sources = {
|
||||
formatting.prettier,
|
||||
formatting.stylua,
|
||||
|
||||
lint.shellcheck,
|
||||
}
|
||||
|
||||
null_ls.setup {
|
||||
debug = true,
|
||||
sources = sources,
|
||||
}
|
||||
68
config/nvim/lua/custom/configs/overrides.lua
Normal file
68
config/nvim/lua/custom/configs/overrides.lua
Normal file
@@ -0,0 +1,68 @@
|
||||
local M = {}
|
||||
|
||||
M.treesitter = {
|
||||
ensure_installed = {
|
||||
"vim",
|
||||
"lua",
|
||||
"html",
|
||||
"css",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"tsx",
|
||||
"c",
|
||||
"cpp",
|
||||
"rust",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python"
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
-- disable = {
|
||||
-- "python"
|
||||
-- },
|
||||
},
|
||||
}
|
||||
|
||||
M.mason = {
|
||||
ensure_installed = {
|
||||
-- lua stuff
|
||||
"lua-language-server",
|
||||
"stylua",
|
||||
|
||||
-- web dev stuff
|
||||
"css-lsp",
|
||||
"html-lsp",
|
||||
"typescript-language-server",
|
||||
"deno",
|
||||
"prettier",
|
||||
|
||||
-- c/cpp stuff
|
||||
"clangd",
|
||||
"clang-format",
|
||||
|
||||
-- rust
|
||||
"rust-analyzer",
|
||||
|
||||
-- python
|
||||
"pyright",
|
||||
},
|
||||
}
|
||||
|
||||
-- git support in nvimtree
|
||||
M.nvimtree = {
|
||||
git = {
|
||||
enable = true,
|
||||
},
|
||||
|
||||
renderer = {
|
||||
highlight_git = true,
|
||||
icons = {
|
||||
show = {
|
||||
git = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
||||
Reference in New Issue
Block a user