nvim: qol on lualine, bufferline, use nixd as nix lsp

This commit is contained in:
js0ny 2025-10-29 04:55:00 +00:00
parent 6fb3efd1dc
commit cd9c91b9bc
11 changed files with 76 additions and 67 deletions

View file

@ -66,6 +66,9 @@ return {
telemetry = {
enable = false,
},
diagnostics = {
globals = { "vim" },
},
-- Lua LS offers a code formatter
-- Ref: https://github.com/LuaLS/lua-language-server/wiki/Formatter
-- format = {

View file

@ -1,32 +0,0 @@
-- <nixCats>/lsp/nil.lua
-- Nil LSP config
vim.lsp.config("nil", {
cmd = { "nil" },
root_markers = {
"flake.nix",
"flake.lock",
},
filetypes = {
"nix",
},
-- Global config options
settings = {
["nil"] = {
formatting = {
command = { "alejandra" },
},
diagnostics = {
ignored = {},
},
nix = {
maxMemoryMB = 2560,
},
flake = {
autoArchive = false,
autoEvalImputs = true,
nixpkgsInputName = "nixpkgs",
},
},
},
})

View file

@ -0,0 +1,22 @@
---@type vim.lsp.Config
return {
cmd = { "nixd" },
root_markers = { "flake.nix", "flake.lock" },
filetypes = { "nix" },
settings = {
nixpkgs = {
expr = "import <nixpkgs> { }",
},
formatting = {
command = { "alejandra" },
},
options = {
nixos = {
expr = '(builtins.getFlake ("git+file://" + toString ./.)).nixosConfigurations.k-on.options',
},
home_manager = {
expr = '(builtins.getFlake ("git+file://" + toString ./.)).homeConfigurations."ruixi@k-on".options',
},
},
},
}