Merge branch 'master' of https://gitea.brudi.xyz/kenobi/dotfiles
This commit is contained in:
commit
53bd5732d5
@ -1,4 +1,5 @@
|
|||||||
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,6 +33,7 @@ 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,11 +30,15 @@ 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 = 150,
|
debounce_text_changes = 250,
|
||||||
}
|
}
|
||||||
|
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities(
|
local capabilities = require('cmp_nvim_lsp').default_capabilities(
|
||||||
@ -73,7 +77,28 @@ 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()
|
||||||
|
require('lspconfig')["yamlls"].setup {
|
||||||
|
on_attach = on_attach,
|
||||||
|
flags = lsp_flags,
|
||||||
|
settings = {
|
||||||
|
yaml = {
|
||||||
|
schemas = { kubernetes = "globPattern" },
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
-- ['sumneko_lua'] = function()
|
-- ['sumneko_lua'] = function()
|
||||||
-- require('lspconfig')["sumneko_lua"].setup {
|
-- require('lspconfig')["sumneko_lua"].setup {
|
||||||
-- on_attach = on_attach,
|
-- on_attach = on_attach,
|
||||||
|
@ -115,4 +115,6 @@ require("packer").startup(function(use)
|
|||||||
requires = { 'MunifTanjim/nui.nvim' },
|
requires = { 'MunifTanjim/nui.nvim' },
|
||||||
}
|
}
|
||||||
use { 'shuntaka9576/preview-swagger.nvim' }
|
use { 'shuntaka9576/preview-swagger.nvim' }
|
||||||
|
use 'tpope/vim-surround'
|
||||||
|
use 'towolf/vim-helm'
|
||||||
end)
|
end)
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
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