chore: uptodate v5
This commit is contained in:
38
lua/plugins/configs/lsp/config/basedpyright.lua
Normal file
38
lua/plugins/configs/lsp/config/basedpyright.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
return {
|
||||
before_init = function(_, c)
|
||||
if not c.settings then
|
||||
c.settings = {}
|
||||
end
|
||||
if not c.settings.python then
|
||||
c.settings.python = {}
|
||||
end
|
||||
c.settings.python.pythonPath = vim.fn.exepath("python")
|
||||
end,
|
||||
settings = {
|
||||
basedpyright = {
|
||||
disableLanguageServices = false,
|
||||
disableOrganizeImports = true,
|
||||
disableTaggedHints = true,
|
||||
|
||||
analysis = {
|
||||
autoSearchPath = false,
|
||||
logLevel = "Trace",
|
||||
typeCheckingMode = "standard",
|
||||
deprecateTypingAliases = false,
|
||||
inlayHints = {
|
||||
variableTypes = true,
|
||||
functionReturnTypes = true,
|
||||
callArgumentNames = true,
|
||||
pytestParameters = true,
|
||||
},
|
||||
ignore = {
|
||||
"unsloth_compiled_cache",
|
||||
"__pycache__",
|
||||
"__index__",
|
||||
},
|
||||
useLibraryCodeForTypes = true,
|
||||
},
|
||||
autoImportCompletions = false,
|
||||
},
|
||||
},
|
||||
}
|
||||
19
lua/plugins/configs/lsp/config/clangd.lua
Normal file
19
lua/plugins/configs/lsp/config/clangd.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
-- return {
|
||||
-- capabilities = {
|
||||
-- offsetEncoding = "utf-8",
|
||||
-- },
|
||||
-- cmd = {
|
||||
-- "clangd",
|
||||
-- "--background-index",
|
||||
-- "--clang-tidy",
|
||||
-- "--all-scopes-completion",
|
||||
-- "--header-insertion=iwyu",
|
||||
-- "--completion-style=detailed",
|
||||
-- "--fallback-style=Microsoft",
|
||||
-- },
|
||||
-- init_options = {
|
||||
-- clangdFileStatus = true,
|
||||
-- usePlaceholders = false,
|
||||
-- completeUnimported = true,
|
||||
-- },
|
||||
-- }
|
||||
31
lua/plugins/configs/lsp/config/jedi_language.lua
Normal file
31
lua/plugins/configs/lsp/config/jedi_language.lua
Normal file
@@ -0,0 +1,31 @@
|
||||
return {
|
||||
|
||||
init_options = {
|
||||
completion = {
|
||||
disableSnippets = true,
|
||||
},
|
||||
diagnostics = {
|
||||
enable = false,
|
||||
},
|
||||
hover = {
|
||||
enable = true,
|
||||
},
|
||||
workspace = {
|
||||
-- environmentPath = "/home/duckq1u/miniconda3/envs/OCR3/bin/python",
|
||||
environmentPath = vim.fn.exepath("python"),
|
||||
ignore = {
|
||||
"/home/duckq1u/miniconda3/envs/OCR3/lib/python3.11/site-packages/transformers/mode ls/albert/configuration_albert.py",
|
||||
},
|
||||
},
|
||||
|
||||
jediSettings = {
|
||||
autoImportModules = {
|
||||
"numpy",
|
||||
"pandas",
|
||||
"torch",
|
||||
-- "torchmetrics",
|
||||
-- "pytorch_lightning",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
16
lua/plugins/configs/lsp/config/pylsp.lua
Normal file
16
lua/plugins/configs/lsp/config/pylsp.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
return {
|
||||
settings = {
|
||||
pylsp = {
|
||||
plugins = {
|
||||
pyflakes = { enabled = false }, -- disable pyflakes
|
||||
pycodestyle = { enabled = false }, -- disable pycodestyle
|
||||
flake8 = { enabled = false }, -- disable flake8
|
||||
yapf = { enabled = false }, -- disable yapf
|
||||
mcabe = { enabled = false }, -- disable mccabe
|
||||
pylsp_black = { enabled = false }, -- disable black
|
||||
pylsp_mypy = { enabled = false }, -- disable mypy
|
||||
pylsp_isort = { enabled = false }, -- disable isort
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
26
lua/plugins/configs/lsp/config/pyright.lua
Normal file
26
lua/plugins/configs/lsp/config/pyright.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
return {
|
||||
before_init = function(_, c)
|
||||
if not c.settings then
|
||||
c.settings = {}
|
||||
end
|
||||
if not c.settings.python then
|
||||
c.settings.python = {}
|
||||
end
|
||||
c.settings.python.pythonPath = vim.fn.exepath("python")
|
||||
end,
|
||||
settings = {
|
||||
pyright = {
|
||||
disableLanguageServices = false,
|
||||
disableOrganizeImports = true,
|
||||
analysis = {
|
||||
-- diagnosticMode = "openFilesOnly",
|
||||
typeCheckingMode = "standard",
|
||||
autoSearchPath = true,
|
||||
-- diagnosticSeverityOverrides = false,
|
||||
logLevel = "Trace",
|
||||
},
|
||||
},
|
||||
-- python = {
|
||||
-- },
|
||||
},
|
||||
}
|
||||
26
lua/plugins/configs/lsp/config/ruff.lua
Normal file
26
lua/plugins/configs/lsp/config/ruff.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
return {
|
||||
before_init = function(_, c)
|
||||
if not c.settings then
|
||||
c.settings = {}
|
||||
end
|
||||
if not c.settings.python then
|
||||
c.settings.python = {}
|
||||
end
|
||||
c.settings.python.pythonPath = vim.fn.exepath("python")
|
||||
end,
|
||||
settings = {
|
||||
pyright = {
|
||||
disableLanguageServices = false,
|
||||
disableOrganizeImports = true,
|
||||
analysis = {
|
||||
-- diagnosticMode = "openFilesOnly",
|
||||
typeCheckingMode = "standard",
|
||||
autoSearchPath = true,
|
||||
-- diagnosticSeverityOverrides = false,
|
||||
logLevel = "Trace",
|
||||
},
|
||||
},
|
||||
-- python = {
|
||||
-- },
|
||||
},
|
||||
}
|
||||
20
lua/plugins/configs/lsp/formatting.lua
Normal file
20
lua/plugins/configs/lsp/formatting.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
-- Customize lsp formatting options
|
||||
return { -- control auto formatting on save
|
||||
format_on_save = {
|
||||
enabled = false, -- enable or disable format on save globally
|
||||
allow_filetypes = { -- enable format on save for specified filetypes only
|
||||
-- "go",
|
||||
},
|
||||
ignore_filetypes = { -- disable format on save for specified filetypes
|
||||
-- "lua",
|
||||
},
|
||||
},
|
||||
disabled = { -- disable formatting capabilities for the listed language servers
|
||||
-- disable lua_ls formatting capability if you want to use StyLua to format your lua code
|
||||
-- "lua_ls",
|
||||
},
|
||||
timeout_ms = 1000, -- default format timeout
|
||||
-- filter = function(client) -- fully override the default formatting function
|
||||
-- return true
|
||||
-- end
|
||||
}
|
||||
Reference in New Issue
Block a user