diff options
Diffstat (limited to 'nvim/lua/configs')
| -rw-r--r-- | nvim/lua/configs/conform.lua | 15 | ||||
| -rw-r--r-- | nvim/lua/configs/lazy.lua | 47 | ||||
| -rw-r--r-- | nvim/lua/configs/lspconfig.lua | 67 |
3 files changed, 129 insertions, 0 deletions
diff --git a/nvim/lua/configs/conform.lua b/nvim/lua/configs/conform.lua new file mode 100644 index 0000000..35ba6cf --- /dev/null +++ b/nvim/lua/configs/conform.lua @@ -0,0 +1,15 @@ +local options = { + formatters_by_ft = { + lua = { "stylua" }, + -- css = { "prettier" }, + -- html = { "prettier" }, + }, + + -- format_on_save = { + -- -- These options will be passed to conform.format() + -- timeout_ms = 500, + -- lsp_fallback = true, + -- }, +} + +return options diff --git a/nvim/lua/configs/lazy.lua b/nvim/lua/configs/lazy.lua new file mode 100644 index 0000000..cd170bd --- /dev/null +++ b/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/nvim/lua/configs/lspconfig.lua b/nvim/lua/configs/lspconfig.lua new file mode 100644 index 0000000..cc741bd --- /dev/null +++ b/nvim/lua/configs/lspconfig.lua @@ -0,0 +1,67 @@ +require("nvchad.configs.lspconfig").defaults() + +local servers = { "html", "cssls", "rust_analyzer", "zls" } +vim.lsp.enable(servers) + +local lspconfig = require("lspconfig") + +-- Rust +lspconfig.rust_analyzer.setup{} + +-- Zig +lspconfig.zls.setup{ + cmd = { "zls" }, + filetypes = { "zig", "zir" }, + root_dir = lspconfig.util.root_pattern("build.zig", "zls.json", ".git") +} + +-- TS/JS +lspconfig.ts_ls.setup { + cmd = { "typescript-language-server", "--stdio" }, + filetypes = { + "javascript", "javascriptreact", + "typescript", "typescriptreact", + "javascript.jsx", "typescript.tsx" + }, + root_dir = lspconfig.util.root_pattern("package.json", "tsconfig.json", ".git") +} + +-- Python +lspconfig.pylsp.setup { + cmd = { "pylsp" }, + filetypes = { "python" }, + settings = { + pylsp = { + plugins = { + black = { enabled = true }, + ruff = { enabled = true }, + flake8 = { enabled = true }, + isort = { enabled = true } + } + } + } +} + +-- Elixir +lspconfig.elixirls.setup { + cmd = { "elixir-ls" }, + filetypes = { "elixir" }, +} + +-- Erlang +lspconfig.erlangls.setup { + cmd = { "erlang-ls" }, + filetypes = { "erlang" }, +} + +-- C/C++ +lspconfig.clangd.setup { + cmd = { "clangd" }, + filetypes = { "c", "cpp" } +} + +-- Gopls +lspconfig.gopls.setup { + cmd = { "gopls" }, + filetype = { "go" } +} |
