adding nvchad config

This commit is contained in:
2022-08-04 12:45:36 +01:00
commit a8126bf9b8
5 changed files with 86 additions and 0 deletions

43
nvchad/chadrc.lua Normal file
View 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
View 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
View 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
View 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
}
}

View 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