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" },
|
"cyberdream.nvim": { "branch": "main", "commit": "cd3c2e7955034a5bec0e1beb9d7cb80c639ef5d5" },
|
||||||
"dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" },
|
"dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" },
|
||||||
"duplicate.nvim": { "branch": "main", "commit": "ab057af7872c44e6fbd48df9b03983c8e67c50a7" },
|
"duplicate.nvim": { "branch": "main", "commit": "ab057af7872c44e6fbd48df9b03983c8e67c50a7" },
|
||||||
|
"faster.nvim": { "branch": "main", "commit": "c3a5286765b43263791eb736affeb6fdff81e4ef" },
|
||||||
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" },
|
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "0b04035bb7b3c83e999b9676e2fb46fd0aa9f910" },
|
"gitsigns.nvim": { "branch": "main", "commit": "0b04035bb7b3c83e999b9676e2fb46fd0aa9f910" },
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ return {
|
|||||||
autoformat = false, -- enable or disable auto formatting on start
|
autoformat = false, -- enable or disable auto formatting on start
|
||||||
codelens = false, -- enable/disable codelens refresh on start
|
codelens = false, -- enable/disable codelens refresh on start
|
||||||
inlay_hints = false, -- enable/disable inlay hints 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
|
-- customize lsp formatting options
|
||||||
formatting = require "plugins.configs.lsp.formatting",
|
formatting = require "plugins.configs.lsp.formatting",
|
||||||
@@ -29,10 +29,17 @@ return {
|
|||||||
completion = {
|
completion = {
|
||||||
-- disableSnippets = true,
|
-- disableSnippets = true,
|
||||||
},
|
},
|
||||||
|
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
enable = false,
|
enable = false,
|
||||||
}
|
},
|
||||||
|
jediSettings = {
|
||||||
|
autoImportModules = {
|
||||||
|
"numpy",
|
||||||
|
"pandas",
|
||||||
|
"torch",
|
||||||
|
"sklearn",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ruff = {
|
ruff = {
|
||||||
@@ -71,7 +78,8 @@ return {
|
|||||||
"TD003",
|
"TD003",
|
||||||
"FIX002",
|
"FIX002",
|
||||||
"N803",
|
"N803",
|
||||||
"PD901"
|
"PD901",
|
||||||
|
"F401",
|
||||||
},
|
},
|
||||||
fixable = { "ALL" },
|
fixable = { "ALL" },
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -21,19 +21,19 @@ return {
|
|||||||
{
|
{
|
||||||
name = "nvim_lsp",
|
name = "nvim_lsp",
|
||||||
priority = 700,
|
priority = 700,
|
||||||
entry_filter = function(entry, ctx)
|
-- entry_filter = function(entry, ctx)
|
||||||
|
|
||||||
local kind = cmp.get_registered_sources()
|
-- local kind = cmp.get_registered_sources()
|
||||||
-- if kind.sources == 'jedi_language_server' then return true end return false
|
-- -- if kind.sources == 'jedi_language_server' then return true end return false
|
||||||
for _, source in ipairs(kind) do
|
-- for _, source in ipairs(kind) do
|
||||||
-- Kiểm tra nếu nguồn là 'jedi_language_server'
|
-- -- 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
|
-- if source.name == "nvim_lsp" and source.source.client.name == "jedi_language_server" then
|
||||||
return true
|
-- return true
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
|
|
||||||
return false
|
-- return false
|
||||||
end,
|
-- end,
|
||||||
},
|
},
|
||||||
{ name = "buffer", priority = 500 },
|
{ name = "buffer", priority = 500 },
|
||||||
{ name = "path", priority = 250 },
|
{ name = "path", priority = 250 },
|
||||||
|
|||||||
@@ -7,10 +7,12 @@ return {
|
|||||||
settings = {
|
settings = {
|
||||||
basedpyright = {
|
basedpyright = {
|
||||||
|
|
||||||
|
disableOrganizeImports = true,
|
||||||
|
|
||||||
analysis = {
|
analysis = {
|
||||||
-- diagnosticMode = "workspace",
|
-- diagnosticMode = "workspace",
|
||||||
diagnosticMode = "openFilesOnly",
|
diagnosticMode = "openFilesOnly",
|
||||||
typeCheckingMode = "off",
|
typeCheckingMode = "basic",
|
||||||
autoImportCompletions = false,
|
autoImportCompletions = false,
|
||||||
autoSearchPath = false,
|
autoSearchPath = false,
|
||||||
logLevel = "error",
|
logLevel = "error",
|
||||||
@@ -18,15 +20,20 @@ return {
|
|||||||
inlayHints = {
|
inlayHints = {
|
||||||
variableTypes = true,
|
variableTypes = true,
|
||||||
functionReturnTypes = true,
|
functionReturnTypes = true,
|
||||||
callArgumentNames = true,
|
callArgumentNames = false,
|
||||||
pytestParameters = true,
|
pytestParameters = true,
|
||||||
},
|
},
|
||||||
useLibraryCodeForTypes = false,
|
useLibraryCodeForTypes = false,
|
||||||
strictListInference = true,
|
|
||||||
strictDictionaryInference = true,
|
|
||||||
deprecateTypingAliases = false,
|
deprecateTypingAliases = false,
|
||||||
enableReachabilityAnalysis = false,
|
enableReachabilityAnalysis = false,
|
||||||
|
|
||||||
|
strictListInference = true,
|
||||||
|
strictDictionaryInference = true,
|
||||||
|
strictSetInference = true,
|
||||||
|
|
||||||
|
analyzeUnannotatedFunctions = false,
|
||||||
|
-- ignore = { "**/*.py" },
|
||||||
|
|
||||||
diagnosticSeverityOverrides = {
|
diagnosticSeverityOverrides = {
|
||||||
reportUnusedImport = "none",
|
reportUnusedImport = "none",
|
||||||
reportUnusedFunction = "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",
|
"lua_ls",
|
||||||
-- "jedi_language_server",
|
-- "jedi_language_server",
|
||||||
"ruff",
|
"ruff",
|
||||||
-- "basedpyright",
|
"basedpyright",
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
@@ -22,12 +22,7 @@ return {
|
|||||||
-- overrides `require("mason-null-ls").setup(...)`
|
-- overrides `require("mason-null-ls").setup(...)`
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
-- add more things to the ensure_installed table protecting against community packs modifying it
|
-- 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, {
|
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, {})
|
||||||
-- "stylua",
|
|
||||||
-- "clang-format",
|
|
||||||
-- "black",
|
|
||||||
-- "prettier",
|
|
||||||
})
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ return {
|
|||||||
'*.rar',
|
'*.rar',
|
||||||
'*.pdf',
|
'*.pdf',
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
enable_git_status = false,
|
enable_git_status = false,
|
||||||
|
|||||||
@@ -43,26 +43,26 @@ return {
|
|||||||
-- },
|
-- },
|
||||||
},
|
},
|
||||||
position = "bottom",
|
position = "bottom",
|
||||||
size = 20,
|
size = 8,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
-- config = function(_, opts)
|
||||||
local dap = require "dap"
|
-- local dap = require "dap"
|
||||||
local dapui = require "dapui"
|
-- local dapui = require "dapui"
|
||||||
|
|
||||||
-- Initialize dap-ui
|
-- -- Initialize dap-ui
|
||||||
dapui.setup(opts)
|
-- dapui.setup(opts)
|
||||||
|
|
||||||
-- Prevent UI from closing when debugging session ends
|
-- -- Prevent UI from closing when debugging session ends
|
||||||
dap.listeners.after.event_terminated["dapui"] = function()
|
-- dap.listeners.after.event_terminated["dapui"] = function()
|
||||||
-- Do nothing, keeping the UI open
|
-- -- Do nothing, keeping the UI open
|
||||||
end
|
-- end
|
||||||
dap.listeners.after.event_exited["dapui"] = function()
|
-- dap.listeners.after.event_exited["dapui"] = function()
|
||||||
-- Do nothing, keeping the UI open
|
-- -- Do nothing, keeping the UI open
|
||||||
end
|
-- end
|
||||||
|
|
||||||
-- Optionally, open dap-ui when session starts
|
-- -- Optionally, open dap-ui when session starts
|
||||||
dap.listeners.after.event_initialized["dapui"] = function() dapui.open() end
|
-- dap.listeners.after.event_initialized["dapui"] = function() dapui.open() end
|
||||||
end,
|
-- end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ return {
|
|||||||
})
|
})
|
||||||
opts.highlight = {
|
opts.highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
disable = { "c", "rust", "tsx", "javascript", "python"},
|
disable = { "c", "rust", "tsx", "javascript"},
|
||||||
additional_vim_regex_highlighting = false,
|
additional_vim_regex_highlighting = false,
|
||||||
custom_captures = {
|
custom_captures = {
|
||||||
-- Highlight local variables
|
-- Highlight local variables
|
||||||
|
|||||||
Reference in New Issue
Block a user