diff --git a/init.lua b/init.lua index 95ddb28..088fb4a 100644 --- a/init.lua +++ b/init.lua @@ -25,6 +25,7 @@ require('lazy').setup({ 'stevearc/conform.nvim', -- Autoformatting 'tanvirtin/monokai.nvim', -- Theme 'lewis6991/gitsigns.nvim', -- Nice git annotations + 'nvim-treesitter/nvim-treesitter', { 'nvim-mini/mini.nvim', version = '*' }, -- Fuzzy Finder (files, lsp, etc) @@ -47,18 +48,19 @@ require('lazy').setup({ }, }, {}) -vim.lsp.enable 'ruff' -vim.lsp.enable 'gopls' -vim.lsp.enable 'clangd' -vim.lsp.enable 'elixirls' -vim.lsp.enable 'ast_grep' -vim.lsp.enable 'yamlls' -vim.lsp.enable 'lua_ls' -vim.lsp.enable 'pylsp' -vim.lsp.enable 'eslint' +local servers = {} +for _, dir in ipairs(vim.api.nvim_get_runtime_file('lsp', true)) do + for name, type in vim.fs.dir(dir) do + if (type == 'file' or type == 'link') and name:sub(-4) == '.lua' then + servers[name:sub(1, -5)] = true -- dedupe across runtimepath entries + end + end +end +vim.lsp.enable(vim.tbl_keys(servers)) -- [[ Setting options ]] -- vim.opt.autocomplete = true -- Autoindent +vim.opt.autocomplete = true vim.opt.ai = true -- Autoindent vim.opt.updatetime = 50 vim.opt.mouse = '' @@ -79,7 +81,6 @@ vim.opt.hlsearch = false vim.opt.smartcase = true -- Display -vim.opt.autocomplete = true vim.opt.nu = true vim.opt.wrap = false vim.opt.termguicolors = false