fix(neovim): remove nix community pack and manually configure
This commit is contained in:
parent
c33c3737f1
commit
81f5afdbc3
5 changed files with 36 additions and 20 deletions
|
@ -95,8 +95,10 @@ in
|
||||||
marksman
|
marksman
|
||||||
|
|
||||||
# Nix
|
# Nix
|
||||||
|
deadnix
|
||||||
nixd
|
nixd
|
||||||
nixfmt-rfc-style
|
nixfmt-rfc-style
|
||||||
|
statix
|
||||||
|
|
||||||
# Python
|
# Python
|
||||||
basedpyright
|
basedpyright
|
||||||
|
|
|
@ -26,7 +26,6 @@ return {
|
||||||
{ import = "astrocommunity.pack.json" },
|
{ import = "astrocommunity.pack.json" },
|
||||||
{ import = "astrocommunity.pack.lua" },
|
{ import = "astrocommunity.pack.lua" },
|
||||||
{ import = "astrocommunity.pack.markdown" },
|
{ import = "astrocommunity.pack.markdown" },
|
||||||
{ import = "astrocommunity.pack.nix" },
|
|
||||||
{ import = "astrocommunity.pack.rust" },
|
{ import = "astrocommunity.pack.rust" },
|
||||||
{ import = "astrocommunity.pack.toml" },
|
{ import = "astrocommunity.pack.toml" },
|
||||||
{ import = "astrocommunity.pack.typescript-all-in-one" },
|
{ import = "astrocommunity.pack.typescript-all-in-one" },
|
||||||
|
|
|
@ -11,11 +11,11 @@ return {
|
||||||
-- Configure core features of AstroNvim
|
-- Configure core features of AstroNvim
|
||||||
features = {
|
features = {
|
||||||
large_buf = { size = 1024 * 500, lines = 10000 }, -- set global limits for large files for disabling features like treesitter
|
large_buf = { size = 1024 * 500, lines = 10000 }, -- set global limits for large files for disabling features like treesitter
|
||||||
autopairs = true, -- enable autopairs at start
|
autopairs = true, -- enable autopairs at start
|
||||||
cmp = true, -- enable completion at start
|
cmp = true, -- enable completion at start
|
||||||
diagnostics_mode = 3, -- diagnostic mode on start (0 = off, 1 = no signs/virtual text, 2 = no virtual text, 3 = on)
|
diagnostics_mode = 3, -- diagnostic mode on start (0 = off, 1 = no signs/virtual text, 2 = no virtual text, 3 = on)
|
||||||
highlighturl = true, -- highlight URLs at start
|
highlighturl = true, -- highlight URLs at start
|
||||||
notifications = true, -- enable notifications at start
|
notifications = true, -- enable notifications at start
|
||||||
},
|
},
|
||||||
-- Diagnostics configuration (for vim.diagnostics.config({...})) when diagnostics are on
|
-- Diagnostics configuration (for vim.diagnostics.config({...})) when diagnostics are on
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
|
@ -24,20 +24,20 @@ return {
|
||||||
},
|
},
|
||||||
-- vim options can be configured here
|
-- vim options can be configured here
|
||||||
options = {
|
options = {
|
||||||
opt = { -- vim.opt.<key>
|
opt = { -- vim.opt.<key>
|
||||||
autoindent = true, -- indents automatically based on context
|
autoindent = true, -- indents automatically based on context
|
||||||
expandtab = true, -- use spaces instead of tabs
|
expandtab = true, -- use spaces instead of tabs
|
||||||
grepprg = "rg --vimgrep", -- use ripgrep on grep actions
|
grepprg = "rg --vimgrep", -- use ripgrep on grep actions
|
||||||
number = true, -- sets vim.opt.number
|
number = true, -- sets vim.opt.number
|
||||||
relativenumber = true, -- sets vim.opt.relativenumber
|
relativenumber = true, -- sets vim.opt.relativenumber
|
||||||
shiftwidth = 2, -- how many spaces after indentation
|
shiftwidth = 2, -- how many spaces after indentation
|
||||||
signcolumn = "auto", -- sets vim.opt.signcolumn to auto
|
signcolumn = "auto", -- sets vim.opt.signcolumn to auto
|
||||||
smartindent = true, -- smartly indent
|
smartindent = true, -- smartly indent
|
||||||
spell = false, -- sets vim.opt.spell
|
spell = false, -- sets vim.opt.spell
|
||||||
tabstop = 2, -- how many spaces to indent when pressing tab
|
tabstop = 2, -- how many spaces to indent when pressing tab
|
||||||
wrap = false, -- sets vim.opt.wrap
|
wrap = false, -- sets vim.opt.wrap
|
||||||
},
|
},
|
||||||
g = { -- vim.g.<key>
|
g = { -- vim.g.<key>
|
||||||
-- configure global vim variables (vim.g)
|
-- configure global vim variables (vim.g)
|
||||||
-- NOTE: `mapleader` and `maplocalleader` must be set in the AstroNvim opts or before `lazy.setup`
|
-- NOTE: `mapleader` and `maplocalleader` must be set in the AstroNvim opts or before `lazy.setup`
|
||||||
-- This can be found in the `lua/lazy_setup.lua` file
|
-- This can be found in the `lua/lazy_setup.lua` file
|
||||||
|
|
|
@ -42,7 +42,7 @@ return {
|
||||||
-- Check supported formatters and linters
|
-- Check supported formatters and linters
|
||||||
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/formatting
|
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/formatting
|
||||||
-- 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
|
||||||
config.sources = {
|
config.sources = require("astrocore").list_insert_unique(config.sources, {
|
||||||
-- Set a formatter
|
-- Set a formatter
|
||||||
require("none-ls.diagnostics.flake8"),
|
require("none-ls.diagnostics.flake8"),
|
||||||
require("none-ls.formatting.ruff"),
|
require("none-ls.formatting.ruff"),
|
||||||
|
@ -54,7 +54,11 @@ return {
|
||||||
null_ls.builtins.formatting.stylua,
|
null_ls.builtins.formatting.stylua,
|
||||||
--deno_fmt,
|
--deno_fmt,
|
||||||
null_ls.builtins.formatting.prettierd,
|
null_ls.builtins.formatting.prettierd,
|
||||||
}
|
|
||||||
|
null_ls.builtins.code_actions.statix,
|
||||||
|
|
||||||
|
null_ls.builtins.diagnostics.deadnix,
|
||||||
|
})
|
||||||
return config -- return final config table
|
return config -- return final config table
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"mfussenegger/nvim-lint",
|
||||||
|
optional = true,
|
||||||
|
opts = {
|
||||||
|
linters_by_ft = {
|
||||||
|
nix = { "statix", "deadnix" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue