astro-nvim-v3 - prevent dap ui close when session terminate
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
"cyberdream.nvim": { "branch": "main", "commit": "cd3c2e7955034a5bec0e1beb9d7cb80c639ef5d5" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" },
|
||||
"duplicate.nvim": { "branch": "main", "commit": "ab057af7872c44e6fbd48df9b03983c8e67c50a7" },
|
||||
"faster.nvim": { "branch": "main", "commit": "c3a5286765b43263791eb736affeb6fdff81e4ef" },
|
||||
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "0b04035bb7b3c83e999b9676e2fb46fd0aa9f910" },
|
||||
|
||||
@@ -12,7 +12,7 @@ return {
|
||||
autoformat = false, -- enable or disable auto formatting on start
|
||||
codelens = false, -- enable/disable codelens refresh on start
|
||||
inlay_hints = false, -- enable/disable inlay hints on start
|
||||
semantic_tokens = true, -- enable/disable semantic token highlighting
|
||||
semantic_tokens = false, -- enable/disable semantic token highlighting
|
||||
},
|
||||
-- customize lsp formatting options
|
||||
formatting = require "plugins.configs.lsp.formatting",
|
||||
@@ -23,16 +23,23 @@ return {
|
||||
config = {
|
||||
-- clangd = require "plugins.configs.lsp.config.clangd",
|
||||
basedpyright = require "plugins.configs.lsp.config.basedpyright",
|
||||
|
||||
|
||||
jedi_language_server = {
|
||||
init_options = {
|
||||
completion = {
|
||||
-- disableSnippets = true,
|
||||
},
|
||||
|
||||
diagnostics = {
|
||||
enable = false,
|
||||
}
|
||||
},
|
||||
jediSettings = {
|
||||
autoImportModules = {
|
||||
"numpy",
|
||||
"pandas",
|
||||
"torch",
|
||||
"sklearn",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
ruff = {
|
||||
@@ -71,7 +78,8 @@ return {
|
||||
"TD003",
|
||||
"FIX002",
|
||||
"N803",
|
||||
"PD901"
|
||||
"PD901",
|
||||
"F401",
|
||||
},
|
||||
fixable = { "ALL" },
|
||||
},
|
||||
|
||||
@@ -21,19 +21,19 @@ return {
|
||||
{
|
||||
name = "nvim_lsp",
|
||||
priority = 700,
|
||||
entry_filter = function(entry, ctx)
|
||||
-- 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
|
||||
-- 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,
|
||||
-- return false
|
||||
-- end,
|
||||
},
|
||||
{ name = "buffer", priority = 500 },
|
||||
{ name = "path", priority = 250 },
|
||||
|
||||
@@ -7,10 +7,12 @@ return {
|
||||
settings = {
|
||||
basedpyright = {
|
||||
|
||||
disableOrganizeImports = true,
|
||||
|
||||
analysis = {
|
||||
-- diagnosticMode = "workspace",
|
||||
diagnosticMode = "openFilesOnly",
|
||||
typeCheckingMode = "off",
|
||||
typeCheckingMode = "basic",
|
||||
autoImportCompletions = false,
|
||||
autoSearchPath = false,
|
||||
logLevel = "error",
|
||||
@@ -18,15 +20,20 @@ return {
|
||||
inlayHints = {
|
||||
variableTypes = true,
|
||||
functionReturnTypes = true,
|
||||
callArgumentNames = true,
|
||||
callArgumentNames = false,
|
||||
pytestParameters = true,
|
||||
},
|
||||
useLibraryCodeForTypes = false,
|
||||
strictListInference = true,
|
||||
strictDictionaryInference = true,
|
||||
deprecateTypingAliases = false,
|
||||
enableReachabilityAnalysis = false,
|
||||
|
||||
strictListInference = true,
|
||||
strictDictionaryInference = true,
|
||||
strictSetInference = true,
|
||||
|
||||
analyzeUnannotatedFunctions = false,
|
||||
-- ignore = { "**/*.py" },
|
||||
|
||||
diagnosticSeverityOverrides = {
|
||||
reportUnusedImport = "none",
|
||||
reportUnusedFunction = "none",
|
||||
|
||||
4
lua/plugins/faster.lua
Normal file
4
lua/plugins/faster.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
"pteroctopus/faster.nvim",
|
||||
opts = {},
|
||||
}
|
||||
@@ -12,7 +12,7 @@ return {
|
||||
"lua_ls",
|
||||
-- "jedi_language_server",
|
||||
"ruff",
|
||||
-- "basedpyright",
|
||||
"basedpyright",
|
||||
})
|
||||
end,
|
||||
},
|
||||
@@ -22,12 +22,7 @@ return {
|
||||
-- overrides `require("mason-null-ls").setup(...)`
|
||||
opts = function(_, opts)
|
||||
-- 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, {
|
||||
-- "stylua",
|
||||
-- "clang-format",
|
||||
-- "black",
|
||||
-- "prettier",
|
||||
})
|
||||
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, {})
|
||||
end,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@ return {
|
||||
'*.rar',
|
||||
'*.pdf',
|
||||
},
|
||||
|
||||
},
|
||||
},
|
||||
enable_git_status = false,
|
||||
|
||||
@@ -43,26 +43,26 @@ return {
|
||||
-- },
|
||||
},
|
||||
position = "bottom",
|
||||
size = 20,
|
||||
size = 8,
|
||||
},
|
||||
},
|
||||
},
|
||||
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,
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ return {
|
||||
})
|
||||
opts.highlight = {
|
||||
enable = true,
|
||||
disable = { "c", "rust", "tsx", "javascript", "python"},
|
||||
disable = { "c", "rust", "tsx", "javascript"},
|
||||
additional_vim_regex_highlighting = false,
|
||||
custom_captures = {
|
||||
-- Highlight local variables
|
||||
|
||||
Reference in New Issue
Block a user