adding nvchad config
This commit is contained in:
43
nvchad/chadrc.lua
Normal file
43
nvchad/chadrc.lua
Normal file
@ -0,0 +1,43 @@
|
||||
local M = {}
|
||||
local override = require "custom.override"
|
||||
|
||||
M.plugins = {
|
||||
user = require "custom.plugins",
|
||||
status = {
|
||||
dashboard = true,
|
||||
alpha = true,
|
||||
},
|
||||
override = {
|
||||
["lewis6991/gitsigns.nvim"] = {
|
||||
signcolumn = true,
|
||||
},
|
||||
["NvChad/ui"] = {
|
||||
tabufline = {
|
||||
enabled = true,
|
||||
lazyload = true,
|
||||
},
|
||||
},
|
||||
["williamboman/mason"] = override.mason,
|
||||
},
|
||||
options = {
|
||||
lspconfig = {
|
||||
setup_lspconf = "custom.plugins.lspconfig",
|
||||
},
|
||||
},
|
||||
}
|
||||
M.options = {
|
||||
user = function()
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.softtabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
end
|
||||
}
|
||||
M.ui = {
|
||||
theme = "everforest",
|
||||
theme_toggle = {"everforest", "everforest_light"},
|
||||
lazyload = false,
|
||||
}
|
||||
|
||||
M.mappings = require "custom.mappings"
|
||||
|
||||
return M
|
11
nvchad/mappings.lua
Normal file
11
nvchad/mappings.lua
Normal file
@ -0,0 +1,11 @@
|
||||
local M = {}
|
||||
|
||||
M.formatter = {
|
||||
n = {
|
||||
["<Leader>fq"] = {"<cmd> Neoformat<CR>", "Formatted :)"},
|
||||
["<Leader>b"] = {"<cmd> Gitsigns toggle_current_line_blame<CR>", "Toggled line blames"},
|
||||
["<Leader>bl"] = {"<cmd> Gitsigns blame_line<CR>", "Line blame"}
|
||||
}
|
||||
}
|
||||
|
||||
return M
|
9
nvchad/override.lua
Normal file
9
nvchad/override.lua
Normal file
@ -0,0 +1,9 @@
|
||||
local M = {}
|
||||
M.mason = {
|
||||
ensure_installed = {
|
||||
"typescript-language-server",
|
||||
"tailwindcss-language-server",
|
||||
"eslint-lsp"
|
||||
}
|
||||
}
|
||||
return M
|
11
nvchad/plugins/init.lua
Normal file
11
nvchad/plugins/init.lua
Normal file
@ -0,0 +1,11 @@
|
||||
return {
|
||||
["wakatime/vim-wakatime"] = {},
|
||||
["sbdchd/neoformat"] = {},
|
||||
["williamboman/mason-lspconfig.nvim"] = {},
|
||||
["neovim/nvim-lspconfig"] = {
|
||||
config = function ()
|
||||
require "plugins.configs.lspconfig"
|
||||
require "custom.plugins.lspconfig"
|
||||
end
|
||||
}
|
||||
}
|
12
nvchad/plugins/lspconfig.lua
Normal file
12
nvchad/plugins/lspconfig.lua
Normal file
@ -0,0 +1,12 @@
|
||||
local on_attach = require("plugins.configs.lspconfig").on_attach
|
||||
local capabilities = require("plugins.configs.lspconfig").capabilities
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
local servers = {"tsserver", "tailwindcss", "eslint" }
|
||||
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig[lsp].setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
})
|
||||
end
|
Reference in New Issue
Block a user