astro-nvim-v3 - fix linter
This commit is contained in:
1
init.lua
1
init.lua
@@ -15,7 +15,6 @@ if not pcall(require, "lazy") then
|
|||||||
vim.cmd.quit()
|
vim.cmd.quit()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
require "lazy_setup"
|
require "lazy_setup"
|
||||||
require "polish"
|
require "polish"
|
||||||
|
|
||||||
|
|||||||
@@ -22,15 +22,19 @@ return {
|
|||||||
---@diagnostic disable: missing-fields
|
---@diagnostic disable: missing-fields
|
||||||
config = {
|
config = {
|
||||||
-- clangd = require "plugins.configs.lsp.config.clangd",
|
-- clangd = require "plugins.configs.lsp.config.clangd",
|
||||||
-- basedpyright = require "plugins.configs.lsp.config.basedpyright",
|
basedpyright = require "plugins.configs.lsp.config.basedpyright",
|
||||||
|
|
||||||
jedi_language_server = {
|
jedi_language_server = {
|
||||||
init_options = {
|
init_options = {
|
||||||
completion = {
|
completion = {
|
||||||
disableSnippets = true,
|
disableSnippets = true,
|
||||||
},
|
},
|
||||||
|
-- diagnostics = {
|
||||||
|
-- enable = fa,
|
||||||
|
-- }
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ruff_lsp = {
|
ruff = {
|
||||||
init_options = {
|
init_options = {
|
||||||
settings = {
|
settings = {
|
||||||
args = {
|
args = {
|
||||||
|
|||||||
@@ -74,4 +74,22 @@ return {
|
|||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
-- {
|
||||||
|
-- "neovim/nvim-lspconfig",
|
||||||
|
-- opts = function(_, opts)
|
||||||
|
-- local lspconfig = require "lspconfig"
|
||||||
|
|
||||||
|
-- -- Setup `jedi-language-server` for Python files
|
||||||
|
-- lspconfig.jedi_language_server.setup {
|
||||||
|
-- on_attach = opts.on_attach,
|
||||||
|
-- capabilities = opts.capabilities,
|
||||||
|
-- filetypes = { "python" },
|
||||||
|
-- }
|
||||||
|
|
||||||
|
-- -- Optionally, you can disable pyright
|
||||||
|
-- lspconfig.pyright.setup {
|
||||||
|
-- filetypes = {},
|
||||||
|
-- }
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
|
|
||||||
return {
|
|
||||||
"kmontocam/nvim-conda",
|
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
|
||||||
}
|
|
||||||
@@ -1,34 +1,35 @@
|
|||||||
-- return {
|
return {
|
||||||
-- before_init = function(_, c)
|
before_init = function(_, c)
|
||||||
-- if not c.settings then c.settings = {} end
|
if not c.settings then c.settings = {} end
|
||||||
-- if not c.settings.python then c.settings.python = {} end
|
if not c.settings.python then c.settings.python = {} end
|
||||||
-- c.settings.python.pythonPath = vim.fn.exepath "python"
|
c.settings.python.pythonPath = vim.fn.exepath "python"
|
||||||
-- end,
|
end,
|
||||||
-- settings = {
|
settings = {
|
||||||
-- basedpyright = {
|
basedpyright = {
|
||||||
-- analysis = {
|
pyright = {enabled = false},
|
||||||
-- -- diagnosticMode = "workspace",
|
analysis = {
|
||||||
-- diagnosticMode = "off",
|
-- diagnosticMode = "workspace",
|
||||||
-- typeCheckingMode = "basic",
|
diagnosticMode = "openFilesOnly",
|
||||||
-- autoImportCompletions = true,
|
typeCheckingMode = "basic",
|
||||||
-- autoSearchPath = true,
|
autoImportCompletions = false,
|
||||||
-- inlayHints = {
|
autoSearchPath = true,
|
||||||
-- variableTypes = true,
|
inlayHints = {
|
||||||
-- functionReturnTypes = true,
|
variableTypes = true,
|
||||||
-- callArgumentNames = true,
|
functionReturnTypes = true,
|
||||||
-- pytestParameters = true,
|
callArgumentNames = true,
|
||||||
-- },
|
pytestParameters = true,
|
||||||
-- useLibraryCodeForTypes = true,
|
},
|
||||||
-- diagnosticSeverityOverrides = {
|
useLibraryCodeForTypes = true,
|
||||||
-- reportUnusedImport = "information",
|
diagnosticSeverityOverrides = {
|
||||||
-- reportUnusedFunction = "information",
|
reportUnusedImport = "information",
|
||||||
-- reportUnusedVariable = "information",
|
reportUnusedFunction = "information",
|
||||||
|
reportUnusedVariable = "information",
|
||||||
-- reportGeneralTypeIssues = "none",
|
-- reportGeneralTypeIssues = "none",
|
||||||
-- reportOptionalMemberAccess = "none",
|
-- reportOptionalMemberAccess = "none",
|
||||||
-- reportOptionalSubscript = "none",
|
-- reportOptionalSubscript = "none",
|
||||||
-- reportPrivateImportUsage = "none",
|
-- reportPrivateImportUsage = "none",
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
-- }
|
}
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ return {
|
|||||||
"echasnovski/mini.indentscope",
|
"echasnovski/mini.indentscope",
|
||||||
event = "User AstroFile",
|
event = "User AstroFile",
|
||||||
opts = function()
|
opts = function()
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, "MiniIndentscopeSymbol", { fg = "#FF4500" }) -- Replace #FF4500 with your desired color
|
vim.api.nvim_set_hl(0, "MiniIndentscopeSymbol", { fg = "#FF4500" }) -- Replace #FF4500 with your desired color
|
||||||
return {
|
return {
|
||||||
options = { try_as_border = true, border = "both" },
|
options = { try_as_border = true, border = "both" },
|
||||||
|
|||||||
@@ -12,9 +12,7 @@ return {
|
|||||||
"lua_ls",
|
"lua_ls",
|
||||||
"jedi_language_server",
|
"jedi_language_server",
|
||||||
"ruff",
|
"ruff",
|
||||||
-- "clangd",
|
"basedpyright",
|
||||||
-- "basedpyright",
|
|
||||||
-- "ruff",
|
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -12,10 +12,6 @@ return {
|
|||||||
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
|
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
|
||||||
opts.sources = {
|
opts.sources = {
|
||||||
-- Set a formatter
|
-- Set a formatter
|
||||||
null_ls.builtins.formatting.stylua,
|
|
||||||
null_ls.builtins.formatting.clang_format,
|
|
||||||
-- null_ls.builtins.formatting.black,
|
|
||||||
null_ls.builtins.formatting.prettier,
|
|
||||||
}
|
}
|
||||||
return opts
|
return opts
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -1,75 +0,0 @@
|
|||||||
return {
|
|
||||||
"gen740/SmoothCursor.nvim",
|
|
||||||
config = function()
|
|
||||||
require("smoothcursor").setup {
|
|
||||||
type = "default", -- Cursor movement calculation method, choose "default", "exp" (exponential) or "matrix".
|
|
||||||
|
|
||||||
cursor = "", -- Cursor shape (requires Nerd Font). Disabled in fancy mode.
|
|
||||||
texthl = "SmoothCursor", -- Highlight group. Default is { bg = nil, fg = "#FFD400" }. Disabled in fancy mode.
|
|
||||||
linehl = nil, -- Highlights the line under the cursor, similar to 'cursorline'. "CursorLine" is recommended. Disabled in fancy mode.
|
|
||||||
|
|
||||||
fancy = {
|
|
||||||
enable = true, -- enable fancy mode
|
|
||||||
head = { cursor = "▷", texthl = "SmoothCursor", linehl = nil }, -- false to disable fancy head
|
|
||||||
body = {
|
|
||||||
{ cursor = "", texthl = "SmoothCursorRed" },
|
|
||||||
{ cursor = "", texthl = "SmoothCursorOrange" },
|
|
||||||
{ cursor = "●", texthl = "SmoothCursorYellow" },
|
|
||||||
{ cursor = "●", texthl = "SmoothCursorGreen" },
|
|
||||||
{ cursor = "•", texthl = "SmoothCursorAqua" },
|
|
||||||
{ cursor = ".", texthl = "SmoothCursorBlue" },
|
|
||||||
{ cursor = ".", texthl = "SmoothCursorPurple" },
|
|
||||||
},
|
|
||||||
tail = { cursor = nil, texthl = "SmoothCursor" }, -- false to disable fancy tail
|
|
||||||
},
|
|
||||||
|
|
||||||
matrix = { -- Loaded when 'type' is set to "matrix"
|
|
||||||
head = {
|
|
||||||
-- Picks a random character from this list for the cursor text
|
|
||||||
cursor = require "smoothcursor.matrix_chars",
|
|
||||||
-- Picks a random highlight from this list for the cursor text
|
|
||||||
texthl = {
|
|
||||||
"SmoothCursor",
|
|
||||||
},
|
|
||||||
linehl = nil, -- No line highlight for the head
|
|
||||||
},
|
|
||||||
body = {
|
|
||||||
length = 6, -- Specifies the length of the cursor body
|
|
||||||
-- Picks a random character from this list for the cursor body text
|
|
||||||
cursor = require "smoothcursor.matrix_chars",
|
|
||||||
-- Picks a random highlight from this list for each segment of the cursor body
|
|
||||||
texthl = {
|
|
||||||
"SmoothCursorGreen",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
tail = {
|
|
||||||
-- Picks a random character from this list for the cursor tail (if any)
|
|
||||||
cursor = nil,
|
|
||||||
-- Picks a random highlight from this list for the cursor tail
|
|
||||||
texthl = {
|
|
||||||
"SmoothCursor",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
unstop = false, -- Determines if the cursor should stop or not (false means it will stop)
|
|
||||||
},
|
|
||||||
|
|
||||||
autostart = true, -- Automatically start SmoothCursor
|
|
||||||
always_redraw = true, -- Redraw the screen on each update
|
|
||||||
flyin_effect = nil, -- Choose "bottom" or "top" for flying effect
|
|
||||||
speed = 25, -- Max speed is 100 to stick with your current position
|
|
||||||
intervals = 35, -- Update intervals in milliseconds
|
|
||||||
priority = 10, -- Set marker priority
|
|
||||||
timeout = 3000, -- Timeout for animations in milliseconds
|
|
||||||
threshold = 3, -- Animate only if cursor moves more than this many lines
|
|
||||||
max_threshold = nil, -- If you move more than this many lines, don't animate (if `nil`, deactivate check)
|
|
||||||
disable_float_win = false, -- Disable in floating windows
|
|
||||||
enabled_filetypes = nil, -- Enable only for specific file types, e.g., { "lua", "vim" }
|
|
||||||
disabled_filetypes = nil, -- Disable for these file types, ignored if enabled_filetypes is set. e.g., { "TelescopePrompt", "NvimTree" }
|
|
||||||
-- Show the position of the latest input mode positions.
|
|
||||||
-- A value of "enter" means the position will be updated when entering the mode.
|
|
||||||
-- A value of "leave" means the position will be updated when leaving the mode.
|
|
||||||
-- `nil` = disabled
|
|
||||||
show_last_positions = nil,
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -14,7 +14,7 @@ return {
|
|||||||
})
|
})
|
||||||
opts.highlight = {
|
opts.highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
disable = { "c", "rust", "tsx", "javascript"},
|
disable = { "c", "rust", "tsx", "javascript", "python"},
|
||||||
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