astro-nvim-v3 - change lsp and highlighting

This commit is contained in:
huyjaky
2025-01-01 21:24:31 +07:00
parent 86b1ec41c3
commit fa8ffc5e10
12 changed files with 166 additions and 151 deletions

View File

@@ -1,34 +1,34 @@
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 = {
analysis = {
-- diagnosticMode = "workspace",
diagnosticMode = "openFilesOnly",
typeCheckingMode = "basic",
autoImportCompletions = true,
autoSearchPath = true,
inlayHints = {
variableTypes = true,
functionReturnTypes = true,
callArgumentNames = true,
pytestParameters = true,
},
useLibraryCodeForTypes = true,
diagnosticSeverityOverrides = {
reportUnusedImport = "information",
reportUnusedFunction = "information",
reportUnusedVariable = "information",
-- reportGeneralTypeIssues = "none",
-- reportOptionalMemberAccess = "none",
-- reportOptionalSubscript = "none",
-- reportPrivateImportUsage = "none",
},
},
},
},
}
-- 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 = {
-- analysis = {
-- -- diagnosticMode = "workspace",
-- diagnosticMode = "off",
-- typeCheckingMode = "basic",
-- autoImportCompletions = true,
-- autoSearchPath = true,
-- inlayHints = {
-- variableTypes = true,
-- functionReturnTypes = true,
-- callArgumentNames = true,
-- pytestParameters = true,
-- },
-- useLibraryCodeForTypes = true,
-- diagnosticSeverityOverrides = {
-- reportUnusedImport = "information",
-- reportUnusedFunction = "information",
-- reportUnusedVariable = "information",
-- reportGeneralTypeIssues = "none",
-- reportOptionalMemberAccess = "none",
-- reportOptionalSubscript = "none",
-- reportPrivateImportUsage = "none",
-- },
-- },
-- },
-- },
-- }

View File

@@ -1,19 +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,
},
}
-- 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,
-- },
-- }

View File

@@ -10,28 +10,13 @@ return {
DiagnosticVirtualTextHint = { fg = get_hlgroup("DiagnosticHint").fg, bg = "none" },
DiagnosticVirtualTextInfo = { fg = get_hlgroup("DiagnosticInfo").fg, bg = "none" },
DiagnosticVirtualTextWarn = { fg = get_hlgroup("DiagnosticWarn").fg, bg = "none" },
CursorLineNr = { fg = "#FFD700", bg = "none", bold = true },
Visual = { fg = "#000000", bg = "#FFFFFF", bold = true },
-- remove background of inlay hints
LspInlayHint = { fg = get_hlgroup("LspInlayHint").fg, bg = "none" },
}
if utils.is_available "kanagawa.nvim" and ui.config.colorscheme == "kanagawa" then
local colors = require("kanagawa.colors").setup()
local theme = colors.theme
hl = utils.extend_tbl(hl, {
Pmenu = { fg = theme.ui.shade0, bg = theme.ui.bg_p1 }, -- add `blend = vim.o.pumblend` to enable transparency
PmenuSel = { fg = "NONE", bg = theme.ui.bg_p2 },
PmenuSbar = { bg = theme.ui.bg_m1 },
PmenuThumb = { bg = theme.ui.bg_p2 },
TelescopeTitle = { fg = theme.ui.special, bold = true },
TelescopePromptNormal = { bg = theme.ui.bg_p1 },
TelescopePromptBorder = { fg = theme.ui.bg_p1, bg = theme.ui.bg_p1 },
TelescopeResultsNormal = { fg = theme.ui.fg_dim, bg = theme.ui.bg_m1 },
TelescopeResultsBorder = { fg = theme.ui.bg_m1, bg = theme.ui.bg_m1 },
TelescopePreviewNormal = { bg = theme.ui.bg_dim },
TelescopePromptNormalopePreviewBorder = { bg = theme.ui.bg_dim, fg = theme.ui.bg_dim },
})
end
}
return hl
end,
@@ -39,3 +24,4 @@ return {
-- Normal = { bg = "#000000" },
},
}