Changed to nvchad

This commit is contained in:
2023-06-08 16:31:50 +02:00
parent a12f9c63c4
commit 7064af4558
12 changed files with 354 additions and 24 deletions

View 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,
},
},
},
})

View 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,
}

View 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