Compare commits
6 Commits
25361af105
...
54f3d9109d
Author | SHA1 | Date | |
---|---|---|---|
|
54f3d9109d | ||
|
8f3a41bd44 | ||
|
99761650d0 | ||
|
46d18355c7 | ||
|
52cf202a77 | ||
|
9c45ddfd69 |
@ -1,4 +1,5 @@
|
||||
local set = vim.opt
|
||||
set.title = true
|
||||
set.modelines = 0
|
||||
set.hidden = 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>fh", "<cmd>lua require('telescope.builtin').help_tags()<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("<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>gr', vim.lsp.buf.references, 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
|
||||
|
||||
local lsp_flags = {
|
||||
-- This is the default in Nvim 0.7+
|
||||
debounce_text_changes = 150,
|
||||
debounce_text_changes = 250,
|
||||
}
|
||||
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities(
|
||||
@ -49,7 +53,7 @@ require('mason-lspconfig').setup_handlers {
|
||||
capabilities = capabilities
|
||||
}
|
||||
end,
|
||||
['rust_analyzer'] = function()
|
||||
['rust_analyzer'] = function()
|
||||
local rustToolsOpts = {
|
||||
tools = {
|
||||
inlay_hints = {
|
||||
@ -64,7 +68,7 @@ require('mason-lspconfig').setup_handlers {
|
||||
capabilities = capabilities,
|
||||
flags = lsp_flags,
|
||||
settings = {
|
||||
["rust_analyzer"] = {
|
||||
["rust_analyzer"] = {
|
||||
checkOnSave = {
|
||||
command = "clippy"
|
||||
}
|
||||
@ -73,20 +77,41 @@ require('mason-lspconfig').setup_handlers {
|
||||
}
|
||||
}
|
||||
require('rust-tools').setup(rustToolsOpts)
|
||||
end,
|
||||
['sumneko_lua'] = function()
|
||||
require('lspconfig')["sumneko_lua"].setup {
|
||||
--on_attach = on_attach,
|
||||
--flags = lsp_flags,
|
||||
require('lspconfig')['rust_analyzer'].setup {
|
||||
on_attach = on_attach,
|
||||
flags = lsp_flags,
|
||||
-- server-specific settings...
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim" }
|
||||
}
|
||||
}
|
||||
["rust-analyzer"] = {}
|
||||
}
|
||||
}
|
||||
end,
|
||||
['yamlls'] = function()
|
||||
require('lspconfig')["yamlls"].setup {
|
||||
on_attach = on_attach,
|
||||
flags = lsp_flags,
|
||||
settings = {
|
||||
yaml = {
|
||||
schemas = { kubernetes = "globPattern" },
|
||||
}
|
||||
}
|
||||
}
|
||||
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 {
|
||||
-- on_attach = on_attach,
|
||||
@ -96,4 +121,4 @@ require('mason-lspconfig').setup_handlers {
|
||||
-- ["rust-analyzer"] = {}
|
||||
-- }
|
||||
--}
|
||||
require"fidget".setup{}
|
||||
require "fidget".setup {}
|
||||
|
@ -110,8 +110,10 @@ require("packer").startup(function(use)
|
||||
use 'simrat39/symbols-outline.nvim'
|
||||
use 'j-hui/fidget.nvim'
|
||||
use {
|
||||
'ThyW/todotxt.nvim',
|
||||
branch = "vim-ui-input",
|
||||
requires = {'MunifTanjim/nui.nvim'},
|
||||
}
|
||||
'ThyW/todotxt.nvim',
|
||||
branch = "vim-ui-input",
|
||||
requires = { 'MunifTanjim/nui.nvim' },
|
||||
}
|
||||
use 'tpope/vim-surround'
|
||||
use 'towolf/vim-helm'
|
||||
end)
|
||||
|
@ -1,6 +1,11 @@
|
||||
require('telescope').load_extension('lsp_handlers')
|
||||
local trouble = require('trouble.providers.telescope')
|
||||
require('telescope').setup({
|
||||
defaults={
|
||||
mappings={
|
||||
i = { ["<c-t>"] = trouble.open_with_trouble },
|
||||
n = { ["<c-t>"] = trouble.open_with_trouble },
|
||||
},
|
||||
path_display={"smart"},
|
||||
},
|
||||
pickers={
|
||||
|
Loading…
Reference in New Issue
Block a user