Added editor configuration

This commit is contained in:
2023-07-17 12:01:07 +02:00
parent 3485f2fb6a
commit 6df4895839
8 changed files with 112 additions and 3 deletions

View File

@ -0,0 +1,6 @@
---@type ChadrcConfig
local M = {}
M.ui = {theme = 'onedark'}
M.plugins = "custom.plugins"
M.mappings = require "custom.mappings"
return M

View File

@ -0,0 +1,21 @@
local on_attach = require("plugins.configs.lspconfig").on_attach
local capabilities = require("plugins.configs.lspconfig").capabilities
local lspconfig = require "lspconfig"
local servers = {
"clangd",
"cssls",
"html",
"gopls",
"lua_ls",
"svelte",
"tsserver",
}
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
on_attach = on_attach,
capabilities = capabilities,
}
end

View File

@ -0,0 +1,9 @@
local opt = vim.opt
-- Indenting
opt.expandtab = false
opt.shiftwidth = 4
opt.tabstop = 4
opt.softtabstop = 4
opt.autoindent = true
opt.smartindent = true

View File

@ -0,0 +1,7 @@
local M = {}
M.disabled = {
n = {}
}
return M

View File

@ -0,0 +1,31 @@
local plugins = {
{
"neovim/nvim-lspconfig",
config = function()
require "plugins.configs.lspconfig"
require "custom.configs.lspconfig"
end,
},
{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
-- default
"lua",
-- web dev
"html",
"css",
"javascript",
"typescript",
"svelte",
"json",
-- low level
"go",
},
},
},
}
return plugins