diff --git a/lua/lazy_setup.lua b/lua/lazy_setup.lua index db9d8bd..8af39c0 100644 --- a/lua/lazy_setup.lua +++ b/lua/lazy_setup.lua @@ -22,7 +22,7 @@ require("lazy").setup({ border = "single", size = { width = 0.8, height = 0.8 }, }, - + checker = { enabled = true, notify = false, diff --git a/lua/plugins/astrolsp.lua b/lua/plugins/astrolsp.lua index 84e9a2e..60ab83e 100644 --- a/lua/plugins/astrolsp.lua +++ b/lua/plugins/astrolsp.lua @@ -36,8 +36,6 @@ return { autoImportModules = { "numpy", "pandas", - "torch", - "sklearn", }, }, }, @@ -80,6 +78,8 @@ return { "N803", "PD901", "F401", + "I001", + "RET504", }, fixable = { "ALL" }, }, diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index b517a12..92089a0 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -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 }, }, diff --git a/lua/plugins/configs/lsp/config/basedpyright.lua b/lua/plugins/configs/lsp/config/basedpyright.lua index abe3aca..066a99a 100644 --- a/lua/plugins/configs/lsp/config/basedpyright.lua +++ b/lua/plugins/configs/lsp/config/basedpyright.lua @@ -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, }, }, }, diff --git a/lua/plugins/disabled.lua b/lua/plugins/disabled.lua index ff74652..a56205d 100644 --- a/lua/plugins/disabled.lua +++ b/lua/plugins/disabled.lua @@ -4,12 +4,11 @@ return { { "s1n7ax/nvim-window-picker", enabled = false }, { "akinsho/toggleterm.nvim", enabled = false }, { "NvChad/nvim-colorizer.lua", enabled = false }, - { "catppuccin/nvim", name = "catppuccin", enabled = false}, + { "catppuccin/nvim", name = "catppuccin", enabled = false }, { "rebelot/kanagawa.nvim", enabled = false }, { "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 diff --git a/lua/plugins/lsp-features.lua b/lua/plugins/lsp-features.lua index 99bd078..2f5fe02 100644 --- a/lua/plugins/lsp-features.lua +++ b/lua/plugins/lsp-features.lua @@ -9,7 +9,6 @@ return { bind = true, handler_opts = { border = "rounded" }, hint_enable = true, - hint_prefix = "🐼 ", debug = true, verbose = true, diff --git a/lua/plugins/mason.lua b/lua/plugins/mason.lua index 27063c4..5f79651 100644 --- a/lua/plugins/mason.lua +++ b/lua/plugins/mason.lua @@ -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", }) diff --git a/lua/plugins/nvim-dap-ui.lua b/lua/plugins/nvim-dap-ui.lua index a8383f0..cbb8bdc 100644 --- a/lua/plugins/nvim-dap-ui.lua +++ b/lua/plugins/nvim-dap-ui.lua @@ -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, } diff --git a/lua/plugins/nvim-dap-virtual-text.lua b/lua/plugins/nvim-dap-virtual-text.lua index 6e8fcde..0b6c725 100644 --- a/lua/plugins/nvim-dap-virtual-text.lua +++ b/lua/plugins/nvim-dap-virtual-text.lua @@ -5,5 +5,7 @@ return { commented = false, enabled = true, enabled_commands = true, + show_stop_reason = true, + virt_text_pos = 'eol' }, }