mirror of
https://github.com/d0zingcat/dotfiles.git
synced 2026-05-13 23:16:44 +00:00
2
.zshrc
2
.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'
|
||||
|
||||
@@ -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', '<leader>of', ':lua OpenFinder()<CR>', { noremap = true, silent = true })
|
||||
|
||||
vim.api.nvim_set_keymap('n', '<leader>of', ':lua OpenFinder()<CR>', { noremap = true, silent = true })
|
||||
|
||||
@@ -15,7 +15,7 @@ vim.opt.rtp:prepend(lazypath)
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
{ import = 'plugins' },
|
||||
{ import = 'plugins.lsp' },
|
||||
-- { import = 'plugins.lsp' },
|
||||
},
|
||||
ui = {
|
||||
border = 'rounded',
|
||||
|
||||
149
nvim/lua/plugins/lsp-setup.lua
Normal file
149
nvim/lua/plugins/lsp-setup.lua
Normal file
@@ -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,
|
||||
['<space>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,
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
5
nvim/lua/plugins/lsp-signature.lua
Normal file
5
nvim/lua/plugins/lsp-signature.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
'ray-x/lsp_signature.nvim',
|
||||
event = 'VeryLazy',
|
||||
config = true,
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
return {}
|
||||
Reference in New Issue
Block a user