HELLO NvChad
This commit is contained in:
30
lua/custom/configs/lspconfig.lua
Normal file
30
lua/custom/configs/lspconfig.lua
Normal file
@@ -0,0 +1,30 @@
|
||||
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"
|
||||
|
||||
-- if you just want default config for the servers then put them in a table
|
||||
local servers = { "html", "cssls", "tsserver", "clangd" }
|
||||
|
||||
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,
|
||||
-- }
|
||||
-- }
|
||||
-- })
|
||||
|
||||
--
|
||||
-- lspconfig.pyright.setup { blabla}
|
||||
21
lua/custom/configs/null-ls.lua
Normal file
21
lua/custom/configs/null-ls.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
local null_ls = require "null-ls"
|
||||
|
||||
local b = null_ls.builtins
|
||||
|
||||
local sources = {
|
||||
|
||||
-- webdev stuff
|
||||
b.formatting.deno_fmt, -- choosed deno for ts/js files cuz its very fast!
|
||||
b.formatting.prettier.with { filetypes = { "html", "markdown", "css" } }, -- so prettier works only on these filetypes
|
||||
|
||||
-- Lua
|
||||
b.formatting.stylua,
|
||||
|
||||
-- cpp
|
||||
b.formatting.clang_format,
|
||||
}
|
||||
|
||||
null_ls.setup {
|
||||
debug = true,
|
||||
sources = sources,
|
||||
}
|
||||
67
lua/custom/configs/overrides.lua
Normal file
67
lua/custom/configs/overrides.lua
Normal file
@@ -0,0 +1,67 @@
|
||||
local cmp = require "cmp"
|
||||
|
||||
local M = {}
|
||||
|
||||
M.treesitter = {
|
||||
ensure_installed = {
|
||||
"vim",
|
||||
"lua",
|
||||
"html",
|
||||
"css",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"tsx",
|
||||
"c",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
},
|
||||
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",
|
||||
},
|
||||
}
|
||||
|
||||
-- git support in nvimtree
|
||||
M.nvimtree = {
|
||||
git = {
|
||||
enable = true,
|
||||
},
|
||||
|
||||
renderer = {
|
||||
highlight_git = true,
|
||||
icons = {
|
||||
show = {
|
||||
git = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- M.cmp = {
|
||||
-- mapping = {
|
||||
-- ["<A-Space>"] = cmp.mapping.complete(),
|
||||
-- }
|
||||
-- }
|
||||
|
||||
return M
|
||||
13
lua/custom/configs/rust-tools.lua
Normal file
13
lua/custom/configs/rust-tools.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
-- local on_attach = require("plugins.configs.lspconfig").on_attach
|
||||
-- local capabilities = require("plugins.configs.lspconfig").capabilities
|
||||
--
|
||||
-- local options = {
|
||||
-- server = {
|
||||
-- on_attach = vim.tbl_deep_extend("force", on_attach, {
|
||||
-- vim.keymap.set("n", "<leader>H", rt)
|
||||
-- },
|
||||
-- capabilities = capabilities,
|
||||
-- },
|
||||
-- }
|
||||
--
|
||||
-- return options
|
||||
Reference in New Issue
Block a user