astro-nvim-v3 - fixed delay on cmp

This commit is contained in:
huyjaky
2025-01-04 14:11:11 +07:00
parent 77d0125417
commit cb6ba2f1ff
9 changed files with 58 additions and 52 deletions

View File

@@ -36,8 +36,6 @@ return {
autoImportModules = {
"numpy",
"pandas",
"torch",
"sklearn",
},
},
},
@@ -80,6 +78,8 @@ return {
"N803",
"PD901",
"F401",
"I001",
"RET504",
},
fixable = { "ALL" },
},

View File

@@ -18,23 +18,7 @@ return {
cmp.setup.filetype("python", {
sources = cmp.config.sources {
{
name = "nvim_lsp",
priority = 700,
-- entry_filter = function(entry, ctx)
-- local kind = cmp.get_registered_sources()
-- -- if kind.sources == 'jedi_language_server' then return true end return false
-- for _, source in ipairs(kind) do
-- -- Kiểm tra nếu nguồn là 'jedi_language_server'
-- if source.name == "nvim_lsp" and source.source.client.name == "jedi_language_server" then
-- return true
-- end
-- end
-- return false
-- end,
},
{ name = "nvim_lsp", priority = 700 },
{ name = "buffer", priority = 500 },
{ name = "path", priority = 250 },
},

View File

@@ -8,7 +8,8 @@ return {
basedpyright = {
disableOrganizeImports = true,
-- disableLanguageServices = true,
disableTaggedHints = true,
analysis = {
-- diagnosticMode = "workspace",
diagnosticMode = "openFilesOnly",
@@ -26,24 +27,45 @@ return {
useLibraryCodeForTypes = false,
deprecateTypingAliases = false,
enableReachabilityAnalysis = false,
strictListInference = true,
strictDictionaryInference = true,
strictSetInference = true,
analyzeUnannotatedFunctions = false,
-- ignore = { "**/*.py" },
reportGeneralTypeIssues = false,
diagnosticSeverityOverrides = {
reportUnusedImport = "none",
reportUnusedFunction = "none",
reportUnusedVariable = "none",
reportGeneralTypeIssues = "none",
reportOptionalMemberAccess = "none",
reportOptionalSubscript = "none",
reportPrivateImportUsage = "none",
reportInvalidStubStatement = "none",
reportIncompleteStub = "none",
reportUnusedImport = false,
reportUnusedFunction = false,
reportUnusedVariable = false,
reportGeneralTypeIssues = false,
reportOptionalMemberAccess = false,
reportOptionalSubscript = false,
reportPrivateImportUsage = false,
reportInvalidStubStatement = false,
reportIncompleteStub = false,
reportArgumentType = false,
reportAttributeAccessIssue = false,
reportCallIssue = false,
-- reportNoOverloadImplementation = false,
-- reportOverlappingOverload = false,
-- reportInconsistentOverload = false,
-- reportUnknownMemberType = false,
-- reportFunctionMemberAccess = false,
-- reportPropertyTypeMismatch = false,
-- reportMatchNotExhaustive = false,
-- reportInvalidTypeForm = false,
-- reportAbstractUsage = false,
-- reportAssertTypeFailure = false,
-- reportAssignmentType = false,
-- reportIndexIssue = false,
-- reportInvalidTypeArguments = false,
-- reportOperatorIssue = false,
-- reportOptionalCall = false,
-- reportOptionalIterable = false,
},
},
},

View File

@@ -9,7 +9,6 @@ return {
{ "folke/tokyonight.nvim", enabled = false },
{ "f4z3r/gruvbox-material.nvim", name = "gruvbox-material", enabled = false },
{ "b0o/SchemaStore.nvim", enabled = false },
{ "ray-x/lsp_signature.nvim", enabled = false },
{ "kmontocam/nvim-conda", enabled = false },
{ "NMAC427/guess-indent.nvim", enabled = false },
@@ -28,8 +27,8 @@ return {
{ "iamcco/markdown-preview.nvim", enabled = false },
{ "max397574/better-escape.nvim", enabled = false },
{ "ribru17/bamboo.nvim", enabled = true },
{ "hinell/duplicate.nvim", enabled = false },
-- { "hrsh7th/nvim-cmp", enabled = false },
}
-- if true then return {} end

View File

@@ -9,7 +9,6 @@ return {
bind = true,
handler_opts = { border = "rounded" },
hint_enable = true,
hint_prefix = "🐼 ",
debug = true,
verbose = true,

View File

@@ -10,7 +10,7 @@ return {
-- add more things to the ensure_installed table protecting against community packs modifying it
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, {
"lua_ls",
-- "jedi_language_server",
"jedi_language_server",
"ruff",
"basedpyright",
})

View File

@@ -47,22 +47,22 @@ return {
},
},
},
-- config = function(_, opts)
-- local dap = require "dap"
-- local dapui = require "dapui"
config = function(_, opts)
local dap = require "dap"
local dapui = require "dapui"
-- -- Initialize dap-ui
-- dapui.setup(opts)
-- Initialize dap-ui
dapui.setup(opts)
-- -- Prevent UI from closing when debugging session ends
-- dap.listeners.after.event_terminated["dapui"] = function()
-- -- Do nothing, keeping the UI open
-- end
-- dap.listeners.after.event_exited["dapui"] = function()
-- -- Do nothing, keeping the UI open
-- end
-- Prevent UI from closing when debugging session ends
dap.listeners.after.event_terminated["dapui"] = function()
-- Do nothing, keeping the UI open
end
dap.listeners.after.event_exited["dapui"] = function()
-- Do nothing, keeping the UI open
end
-- -- Optionally, open dap-ui when session starts
-- dap.listeners.after.event_initialized["dapui"] = function() dapui.open() end
-- end,
-- Optionally, open dap-ui when session starts
dap.listeners.after.event_initialized["dapui"] = function() dapui.open() end
end,
}

View File

@@ -5,5 +5,7 @@ return {
commented = false,
enabled = true,
enabled_commands = true,
show_stop_reason = true,
virt_text_pos = 'eol'
},
}