diff options
Diffstat (limited to '.config/nvim/lua/configs')
-rw-r--r-- | .config/nvim/lua/configs/conform.lua | 16 | ||||
-rw-r--r-- | .config/nvim/lua/configs/lazy.lua | 47 | ||||
-rw-r--r-- | .config/nvim/lua/configs/lspconfig.lua | 13 |
3 files changed, 76 insertions, 0 deletions
diff --git a/.config/nvim/lua/configs/conform.lua b/.config/nvim/lua/configs/conform.lua new file mode 100644 index 00000000..24342a6e --- /dev/null +++ b/.config/nvim/lua/configs/conform.lua @@ -0,0 +1,16 @@ +local options = { + formatters_by_ft = { + css = { "prettier" }, + html = { "prettier" }, + python = { "ruff_format" }, + cpp = { "clang-format" }, + c = { "clang-format" }, + typst = { "typstyle" }, + }, + format_on_save = { + timeout_ms = 500, + lsp_fallback = true, + }, +} + +return options diff --git a/.config/nvim/lua/configs/lazy.lua b/.config/nvim/lua/configs/lazy.lua new file mode 100644 index 00000000..cd170bd3 --- /dev/null +++ b/.config/nvim/lua/configs/lazy.lua @@ -0,0 +1,47 @@ +return { + defaults = { lazy = true }, + install = { colorscheme = { "nvchad" } }, + + ui = { + icons = { + ft = "", + lazy = " ", + loaded = "", + not_loaded = "", + }, + }, + + performance = { + rtp = { + disabled_plugins = { + "2html_plugin", + "tohtml", + "getscript", + "getscriptPlugin", + "gzip", + "logipat", + "netrw", + "netrwPlugin", + "netrwSettings", + "netrwFileHandlers", + "matchit", + "tar", + "tarPlugin", + "rrhelper", + "spellfile_plugin", + "vimball", + "vimballPlugin", + "zip", + "zipPlugin", + "tutor", + "rplugin", + "syntax", + "synmenu", + "optwin", + "compiler", + "bugreport", + "ftplugin", + }, + }, + }, +} diff --git a/.config/nvim/lua/configs/lspconfig.lua b/.config/nvim/lua/configs/lspconfig.lua new file mode 100644 index 00000000..b685abd9 --- /dev/null +++ b/.config/nvim/lua/configs/lspconfig.lua @@ -0,0 +1,13 @@ +require("nvchad.configs.lspconfig").defaults() + +local lspconfig = require("lspconfig") +local servers = { "html", "cssls", "pylsp", "clangd", "tinymist" } +local nvlsp = require("nvchad.configs.lspconfig") + +for _, lsp in ipairs(servers) do + lspconfig[lsp].setup({ + on_attach = nvlsp.on_attach, + on_init = nvlsp.on_init, + capabilities = nvlsp.capabilities, + }) +end |