Work on LSP
This commit is contained in:
+22
-21
@@ -1,21 +1,22 @@
|
||||
return {}
|
||||
-- return {
|
||||
-- indentLine_enabled = 1,
|
||||
-- filetype_exclude = {
|
||||
-- "help",
|
||||
-- "terminal",
|
||||
-- "lazy",
|
||||
-- "lspinfo",
|
||||
-- "TelescopePrompt",
|
||||
-- "TelescopeResults",
|
||||
-- "mason",
|
||||
-- "nvdash",
|
||||
-- "nvcheatsheet",
|
||||
-- "",
|
||||
-- },
|
||||
-- buftype_exclude = { "terminal" },
|
||||
-- show_trailing_blankline_indent = false,;
|
||||
-- show_first_indent_level = false,
|
||||
-- show_current_context = true,
|
||||
-- show_current_context_start = true,
|
||||
-- }
|
||||
return {
|
||||
indent = {
|
||||
char = "│",
|
||||
tab_char = "│",
|
||||
},
|
||||
scope = { enabled = false },
|
||||
exclude = {
|
||||
filetypes = {
|
||||
"NvimTree",
|
||||
"Trouble",
|
||||
"alpha",
|
||||
"dashboard",
|
||||
"help",
|
||||
"lazy",
|
||||
"lspinfo",
|
||||
"mason",
|
||||
"neo-tree",
|
||||
"notify",
|
||||
"toggleterm",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
local actions = require "diffview.actions"
|
||||
|
||||
return {
|
||||
hooks = {
|
||||
diff_buf_read = function(_)
|
||||
@@ -8,4 +10,15 @@ return {
|
||||
vim.api.nvim_command "set ft=diff"
|
||||
end,
|
||||
},
|
||||
keymaps = {
|
||||
file_panel = {
|
||||
["<CR>"] = actions.focus_entry,
|
||||
},
|
||||
view = {
|
||||
["<CR>"] = function()
|
||||
print "asd"
|
||||
-- actions.diffget()
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -16,9 +16,46 @@ for _, lsp in ipairs(servers) do
|
||||
}
|
||||
end
|
||||
|
||||
-- configuring single server, example: typescript
|
||||
-- lspconfig.tsserver.setup {
|
||||
-- on_attach = nvlsp.on_attach,
|
||||
-- lsp settings (for overriding per client)
|
||||
local handlers = {
|
||||
["textdocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "rounded" }),
|
||||
["textdocument/signaturehelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = "rounded" }),
|
||||
}
|
||||
|
||||
-- require("lspconfig").pyright.setup {
|
||||
-- on_init = nvlsp.on_init,
|
||||
-- on_attach = nvlsp.on_attach,
|
||||
-- capabilities = nvlsp.capabilities,
|
||||
-- handlers = handlers,
|
||||
--
|
||||
-- settings = {
|
||||
-- pyright = {
|
||||
-- -- options available here: https://github.com/microsoft/pyright/blob/main/docs/settings.md
|
||||
-- disableorganizeimports = true, -- using ruff
|
||||
-- -- disablelanguageservices = true, -- using ruff
|
||||
-- },
|
||||
-- python = {
|
||||
-- analysis = {
|
||||
-- -- ignore = { "*" }, -- using ruff
|
||||
-- -- typecheckingmode = "off", -- using mypy
|
||||
-- diagnosticseverityoverrides = {
|
||||
-- reportmissingimports = false,
|
||||
-- -- reportattributeaccessissue = false,
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- }
|
||||
|
||||
require("lspconfig").pylsp.setup {
|
||||
settings = {
|
||||
pylsp = {
|
||||
plugins = {
|
||||
pycodestyle = {
|
||||
ignore = { "W391", "E501" },
|
||||
maxLineLength = 100,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user