diff --git a/.zshrc b/.zshrc index cbd953f..cf224de 100644 --- a/.zshrc +++ b/.zshrc @@ -203,6 +203,8 @@ alias kns='kubens' alias kctx='kubectx' alias kd='kubectl debug' alias kk='kubectl krew' +alias kzeus='kubectl --context zeus ' +alias khybrid='kubectl --context hybrid' alias kget='kubectl get' alias kdesc='kubectl describe' alias klog='kubectl logs' diff --git a/nvim/lua/config/extension.lua b/nvim/lua/config/extension.lua index 96c0acb..acdcc8d 100644 --- a/nvim/lua/config/extension.lua +++ b/nvim/lua/config/extension.lua @@ -6,5 +6,5 @@ function OpenFinder() local current_path = vim.fn.expand('%:p:h') vim.cmd('!open ' .. current_path) end -vim.api.nvim_set_keymap('n', 'of', ':lua OpenFinder()', { noremap = true, silent = true }) +vim.api.nvim_set_keymap('n', 'of', ':lua OpenFinder()', { noremap = true, silent = true }) diff --git a/nvim/lua/config/lazy.lua b/nvim/lua/config/lazy.lua index 0815307..95b4d8e 100644 --- a/nvim/lua/config/lazy.lua +++ b/nvim/lua/config/lazy.lua @@ -15,7 +15,7 @@ vim.opt.rtp:prepend(lazypath) require("lazy").setup({ spec = { { import = 'plugins' }, - { import = 'plugins.lsp' }, + -- { import = 'plugins.lsp' }, }, ui = { border = 'rounded', diff --git a/nvim/lua/plugins/lsp-setup.lua b/nvim/lua/plugins/lsp-setup.lua new file mode 100644 index 0000000..8019d4f --- /dev/null +++ b/nvim/lua/plugins/lsp-setup.lua @@ -0,0 +1,149 @@ +return { + 'junnplus/lsp-setup.nvim', + dependencies = { + 'neovim/nvim-lspconfig', + 'williamboman/mason.nvim', -- optional + 'williamboman/mason-lspconfig.nvim', -- optional + 'folke/neodev.nvim' + }, + init = function() + vim.lsp.set_log_level('debug') + require('vim.lsp.log').set_format_func(vim.inspect) + + local rounded = { border = 'rounded' } + vim.diagnostic.config({ float = rounded }) + local with_rounded = function(handler) + return vim.lsp.with(handler, rounded) + end + vim.lsp.handlers['textDocument/hover'] = with_rounded(vim.lsp.handlers.hover) + vim.lsp.handlers['textDocument/signatureHelp'] = with_rounded(vim.lsp.handlers.signature_help) + end, + opts = { + mappings = { + gd = function() require('telescope.builtin').lsp_definitions() end, + gi = function() require('telescope.builtin').lsp_implementations() end, + gr = function() require('telescope.builtin').lsp_references() end, + ['f'] = vim.lsp.buf.format, + }, + inlay_hints = { + enabled = true, + debug = true, + }, + servers = { + eslint = {}, + pylsp = { + settings = { + pylsp = { + -- PylspInstall python-lsp-black + -- PylspInstall pyls-isort + configurationSources = { 'flake8' }, + plugins = { + pycodestyle = { + enabled = false, + }, + mccabe = { + enabled = false, + }, + pyflakes = { + enabled = false, + }, + flake8 = { + enabled = true, + }, + black = { + enabled = true, + } + } + } + } + }, + yamlls = { + settings = { + yaml = { + keyOrdering = false + } + } + }, + jsonls = {}, + bashls = {}, + tsserver = { + settings = { + typescript = { + inlayHints = { + includeInlayParameterNameHints = 'all', + includeInlayParameterNameHintsWhenArgumentMatchesName = false, + includeInlayFunctionParameterTypeHints = true, + includeInlayVariableTypeHints = true, + includeInlayVariableTypeHintsWhenTypeMatchesName = false, + includeInlayPropertyDeclarationTypeHints = true, + includeInlayFunctionLikeReturnTypeHints = true, + includeInlayEnumMemberValueHints = true, + } + }, + } + }, + dockerls = {}, + -- jsonnet_ls = {}, + helm_ls = {}, + gopls = { + settings = { + gopls = { + gofumpt = true, + -- staticcheck = true, + usePlaceholders = true, + codelenses = { + gc_details = true, + }, + hints = { + rangeVariableTypes = true, + parameterNames = true, + constantValues = true, + assignVariableTypes = true, + compositeLiteralFields = true, + compositeLiteralTypes = true, + functionTypeParameters = true, + }, + }, + }, + }, + -- bufls = {}, + -- html = {}, + lua_ls = { + settings = { + Lua = { + workspace = { + checkThirdParty = false, + }, + hint = { + enable = true, + arrayIndex = 'Disable', + }, + } + } + }, + ['rust_analyzer@nightly'] = { + settings = { + ['rust-analyzer'] = { + diagnostics = { + disabled = { 'unresolved-proc-macro' }, + }, + cargo = { + loadOutDirsFromCheck = true, + }, + procMacro = { + enable = true, + }, + inlayHints = { + closureReturnTypeHints = { + enable = true + }, + }, + cache = { + warmup = false, + } + }, + }, + } + } + }, +} diff --git a/nvim/lua/plugins/lsp-signature.lua b/nvim/lua/plugins/lsp-signature.lua new file mode 100644 index 0000000..6d65736 --- /dev/null +++ b/nvim/lua/plugins/lsp-signature.lua @@ -0,0 +1,5 @@ +return { + 'ray-x/lsp_signature.nvim', + event = 'VeryLazy', + config = true, +} diff --git a/nvim/lua/plugins/lsp/mason.lua b/nvim/lua/plugins/lsp/mason.lua deleted file mode 100644 index a564707..0000000 --- a/nvim/lua/plugins/lsp/mason.lua +++ /dev/null @@ -1 +0,0 @@ -return {}