diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 7e40f6c..1b45c73 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -21,8 +21,12 @@ end) -- Enable all LSPs local lsp = require('lsp') -for server, _ in pairs(lsp) do - vim.lsp.enable(server) +for server, value in pairs(lsp) do + if server == 'global' then + vim.lsp.config('*', value) + elseif value then + vim.lsp.enable(server) + end end local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim' diff --git a/.config/nvim/lua/lsp.lua b/.config/nvim/lua/lsp.lua index 38d82e4..6bfe894 100644 --- a/.config/nvim/lua/lsp.lua +++ b/.config/nvim/lua/lsp.lua @@ -22,4 +22,15 @@ return { ts_ls = true, -- typescript and yavashit yamlls = true, zls = true, -- zig + + global = { + capabilities = { + workspace = { + fileOperations = { + didRename = true, + willRename = true, + }, + }, + }, + }, } diff --git a/.config/nvim/lua/plugins/conform.lua b/.config/nvim/lua/plugins/conform.lua index fe3356f..b78cd46 100644 --- a/.config/nvim/lua/plugins/conform.lua +++ b/.config/nvim/lua/plugins/conform.lua @@ -1,12 +1,12 @@ return { 'stevearc/conform.nvim', - event = { 'BufWritePre' }, + event = 'VeryLazy', cmd = { 'ConformInfo' }, keys = { { 'ft', 'FormatToggle', desc = '[F]ormat [T]oggle Globally' }, { 'fT', 'FormatToggle!', desc = '[F]ormat [T]oggle Locally' }, { 'ff', 'Format', desc = '[F]ormat [F]ile' }, - { 'f', 'Format', desc = '[F]ormat', mode = 'v' }, + { 'f', 'Format', desc = '[F]ormat', mode = 'v' }, -- FIX: doesn't work }, ---@module "conform" ---@type conform.setupOpts diff --git a/.config/nvim/snippets/lua.json b/.config/nvim/snippets/lua.json index ca94955..0967ef4 100644 --- a/.config/nvim/snippets/lua.json +++ b/.config/nvim/snippets/lua.json @@ -1,15 +1 @@ -{ - "hmmm": { - "body": [ - "for ${1:} in ipairs(${2:}, ${3:}) do", - " ${4:}", - "end", - "", - "What about inside: ${5:${6:${7:}}}", - "", - "$0", - "^ END" - ], - "prefix": "hmmm" - } -} +{}