Compare commits
No commits in common. "54f3d9109d475cb10311ccf5e1a5886b888b579c" and "25361af1055444e3b87b8c1c9dedc234b6d51dc2" have entirely different histories.
54f3d9109d
...
25361af105
@ -1,5 +1,4 @@
|
|||||||
local set = vim.opt
|
local set = vim.opt
|
||||||
set.title = true
|
|
||||||
set.modelines = 0
|
set.modelines = 0
|
||||||
set.hidden = true
|
set.hidden = true
|
||||||
set.number = true
|
set.number = true
|
||||||
|
@ -33,7 +33,6 @@ nmap("<leader>fg", "<cmd>lua require('telescope.builtin').live_grep()<cr>")
|
|||||||
nmap("<leader>fb", "<cmd>lua require('telescope.builtin').buffers()<cr>")
|
nmap("<leader>fb", "<cmd>lua require('telescope.builtin').buffers()<cr>")
|
||||||
nmap("<leader>fh", "<cmd>lua require('telescope.builtin').help_tags()<cr>")
|
nmap("<leader>fh", "<cmd>lua require('telescope.builtin').help_tags()<cr>")
|
||||||
nmap("<leader>ff", "<cmd>lua require('telescope.builtin').find_files()<cr>")
|
nmap("<leader>ff", "<cmd>lua require('telescope.builtin').find_files()<cr>")
|
||||||
nmap("<leader>vb", "<cmd>lua require('telescope.builtin').git_branches()<cr>")
|
|
||||||
|
|
||||||
nmap("<leader>b","<cmd>lua require('telescope.builtin').buffers()<cr>")
|
nmap("<leader>b","<cmd>lua require('telescope.builtin').buffers()<cr>")
|
||||||
nmap("<C-n>",":NvimTreeToggle<cr>")
|
nmap("<C-n>",":NvimTreeToggle<cr>")
|
||||||
|
@ -30,15 +30,11 @@ local on_attach = function(client, bufnr)
|
|||||||
vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, bufopts)
|
vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, bufopts)
|
||||||
vim.keymap.set('n', '<leader>gr', vim.lsp.buf.references, bufopts)
|
vim.keymap.set('n', '<leader>gr', vim.lsp.buf.references, bufopts)
|
||||||
vim.keymap.set('n', '<leader>f', vim.lsp.buf.format, bufopts)
|
vim.keymap.set('n', '<leader>f', vim.lsp.buf.format, bufopts)
|
||||||
|
|
||||||
if vim.bo[bufnr].buftype ~= "" or vim.bo[bufnr].filetype == "helm" then
|
|
||||||
vim.diagnostic.disable()
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local lsp_flags = {
|
local lsp_flags = {
|
||||||
-- This is the default in Nvim 0.7+
|
-- This is the default in Nvim 0.7+
|
||||||
debounce_text_changes = 250,
|
debounce_text_changes = 150,
|
||||||
}
|
}
|
||||||
|
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities(
|
local capabilities = require('cmp_nvim_lsp').default_capabilities(
|
||||||
@ -53,7 +49,7 @@ require('mason-lspconfig').setup_handlers {
|
|||||||
capabilities = capabilities
|
capabilities = capabilities
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
['rust_analyzer'] = function()
|
['rust_analyzer'] = function()
|
||||||
local rustToolsOpts = {
|
local rustToolsOpts = {
|
||||||
tools = {
|
tools = {
|
||||||
inlay_hints = {
|
inlay_hints = {
|
||||||
@ -68,7 +64,7 @@ require('mason-lspconfig').setup_handlers {
|
|||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
flags = lsp_flags,
|
flags = lsp_flags,
|
||||||
settings = {
|
settings = {
|
||||||
["rust_analyzer"] = {
|
["rust_analyzer"] = {
|
||||||
checkOnSave = {
|
checkOnSave = {
|
||||||
command = "clippy"
|
command = "clippy"
|
||||||
}
|
}
|
||||||
@ -77,41 +73,20 @@ require('mason-lspconfig').setup_handlers {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
require('rust-tools').setup(rustToolsOpts)
|
require('rust-tools').setup(rustToolsOpts)
|
||||||
--on_attach = on_attach,
|
|
||||||
--flags = lsp_flags,
|
|
||||||
require('lspconfig')['rust_analyzer'].setup {
|
|
||||||
on_attach = on_attach,
|
|
||||||
flags = lsp_flags,
|
|
||||||
-- server-specific settings...
|
|
||||||
settings = {
|
|
||||||
["rust-analyzer"] = {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
end,
|
end,
|
||||||
['yamlls'] = function()
|
['sumneko_lua'] = function()
|
||||||
require('lspconfig')["yamlls"].setup {
|
require('lspconfig')["sumneko_lua"].setup {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
flags = lsp_flags,
|
flags = lsp_flags,
|
||||||
settings = {
|
settings = {
|
||||||
yaml = {
|
Lua = {
|
||||||
schemas = { kubernetes = "globPattern" },
|
diagnostics = {
|
||||||
|
globals = { "vim" }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end
|
end,
|
||||||
-- ['sumneko_lua'] = function()
|
|
||||||
-- require('lspconfig')["sumneko_lua"].setup {
|
|
||||||
-- on_attach = on_attach,
|
|
||||||
-- flags = lsp_flags,
|
|
||||||
-- settings = {
|
|
||||||
-- Lua = {
|
|
||||||
-- diagnostics = {
|
|
||||||
-- globals = { "vim" }
|
|
||||||
-- }
|
|
||||||
-- }
|
|
||||||
-- }
|
|
||||||
-- }
|
|
||||||
-- end,
|
|
||||||
}
|
}
|
||||||
--require('lspconfig')['rust_analyzer'].setup {
|
--require('lspconfig')['rust_analyzer'].setup {
|
||||||
-- on_attach = on_attach,
|
-- on_attach = on_attach,
|
||||||
@ -121,4 +96,4 @@ require('mason-lspconfig').setup_handlers {
|
|||||||
-- ["rust-analyzer"] = {}
|
-- ["rust-analyzer"] = {}
|
||||||
-- }
|
-- }
|
||||||
--}
|
--}
|
||||||
require "fidget".setup {}
|
require"fidget".setup{}
|
||||||
|
@ -110,10 +110,8 @@ require("packer").startup(function(use)
|
|||||||
use 'simrat39/symbols-outline.nvim'
|
use 'simrat39/symbols-outline.nvim'
|
||||||
use 'j-hui/fidget.nvim'
|
use 'j-hui/fidget.nvim'
|
||||||
use {
|
use {
|
||||||
'ThyW/todotxt.nvim',
|
'ThyW/todotxt.nvim',
|
||||||
branch = "vim-ui-input",
|
branch = "vim-ui-input",
|
||||||
requires = { 'MunifTanjim/nui.nvim' },
|
requires = {'MunifTanjim/nui.nvim'},
|
||||||
}
|
}
|
||||||
use 'tpope/vim-surround'
|
|
||||||
use 'towolf/vim-helm'
|
|
||||||
end)
|
end)
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
require('telescope').load_extension('lsp_handlers')
|
require('telescope').load_extension('lsp_handlers')
|
||||||
local trouble = require('trouble.providers.telescope')
|
|
||||||
require('telescope').setup({
|
require('telescope').setup({
|
||||||
defaults={
|
defaults={
|
||||||
mappings={
|
|
||||||
i = { ["<c-t>"] = trouble.open_with_trouble },
|
|
||||||
n = { ["<c-t>"] = trouble.open_with_trouble },
|
|
||||||
},
|
|
||||||
path_display={"smart"},
|
path_display={"smart"},
|
||||||
},
|
},
|
||||||
pickers={
|
pickers={
|
||||||
|
Loading…
Reference in New Issue
Block a user