Compare commits
2 Commits
5b61ab39f9
...
7c4b7d0db6
Author | SHA1 | Date |
---|---|---|
pegasust | 7c4b7d0db6 | |
htran | 22a78899ed |
|
@ -933,6 +933,32 @@ local inlay_hint_tsjs = {
|
|||
includeInlayVariableTypeHints = true,
|
||||
};
|
||||
|
||||
local setup = {
|
||||
["nil_ls"] = function()
|
||||
require('lspconfig').nil_ls.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
--- refer to https://github.com/oxalica/nil/blob/main/docs/configuration.md
|
||||
--- for the list of configurations available for `nil_ls`
|
||||
settings = {
|
||||
["nil"] = {
|
||||
formatting = {
|
||||
command = { "nix", "run", "nixpkgs#alejandra" },
|
||||
},
|
||||
nix = {
|
||||
flake = {
|
||||
-- calls `nix flake archive` to put a flake and its output to store
|
||||
autoArchive = true,
|
||||
-- auto eval flake inputs for improved completion
|
||||
autoEvalInputs = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
||||
|
||||
require('mason-lspconfig').setup_handlers({
|
||||
-- default handler
|
||||
function(server_name)
|
||||
|
@ -1039,32 +1065,9 @@ require('mason-lspconfig').setup_handlers({
|
|||
},
|
||||
}
|
||||
end,
|
||||
["nil_ls"] = function()
|
||||
require('lspconfig').nil_ls.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
--- refer to https://github.com/oxalica/nil/blob/main/docs/configuration.md
|
||||
--- for the list of configurations available for `nil_ls`
|
||||
settings = {
|
||||
["nil"] = {
|
||||
formatting = {
|
||||
command = { "nix", "run", "nixpkgs#alejandra" },
|
||||
},
|
||||
nix = {
|
||||
flake = {
|
||||
-- calls `nix flake archive` to put a flake and its output to store
|
||||
autoArchive = true,
|
||||
-- auto eval flake inputs for improved completion
|
||||
autoEvalInputs = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
})
|
||||
|
||||
require('lspconfig')["nil_ls"].setup {}
|
||||
setup["nil_ls"]()
|
||||
require("rust-tools").setup {
|
||||
tools = {
|
||||
-- rust-tools options
|
||||
|
|
|
@ -63,7 +63,7 @@ in {
|
|||
base-modules
|
||||
++ [
|
||||
home-profiles.nerd_font_module
|
||||
home-profiles.git-htran
|
||||
home-profiles.git-pegasust
|
||||
home-profiles.dev-packages
|
||||
home-profiles.zk
|
||||
home-modules.darwin-spotlight
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
{inputs, cell}: let
|
||||
# decorator for now, for data collecting :)
|
||||
nix-conf = a: a;
|
||||
in {
|
||||
"htran@mbp" = nix-conf ''
|
||||
accept-flake-config = true
|
||||
experimental-features = nix-command flakes
|
||||
post-build-hook = /etc/nix/upload-to-cache.sh
|
||||
trusted-users = root htran hungtran hwtr
|
||||
max-jobs = 8
|
||||
cores = 12
|
||||
# default is true for Linux, false for every one else
|
||||
# https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-sandbox
|
||||
sandbox = true
|
||||
'';
|
||||
"hungtran@mba-m2" = nix-conf ''
|
||||
accept-flake-config = true
|
||||
experimental-features = nix-command flakes
|
||||
post-build-hook = /etc/nix/upload-to-cache.sh
|
||||
trusted-users = root htran hungtran hwtr
|
||||
max-jobs = 7
|
||||
cores = 8
|
||||
# default is true for Linux, false for every one else
|
||||
# https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-sandbox
|
||||
sandbox = true
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue