mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
nvim: qol on lualine, bufferline, use nixd as nix lsp
This commit is contained in:
parent
6fb3efd1dc
commit
cd9c91b9bc
11 changed files with 76 additions and 67 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
22
home/dot_config/nvim/lsp/nixd.lua
Normal file
22
home/dot_config/nvim/lsp/nixd.lua
Normal 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',
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue