Compare commits
15 commits
fc3a2c48a9
...
a1dcf49602
95
flake.lock
95
flake.lock
|
@ -20,11 +20,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1738183445,
|
||||
"narHash": "sha256-C1He3N1SA8D2u+TSlldbA9wiYwDvXI4GxX3zKaeD7qU=",
|
||||
"lastModified": 1739103745,
|
||||
"narHash": "sha256-c53dcRaw0F4Os9WD05HwIRs9kTDZw4Mxe1XK4edEALo=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "aquamarine",
|
||||
"rev": "48a000cf35dd10bfeb231152735aebbe875f4b74",
|
||||
"rev": "a3dda0d10ce9aa1d1dfb7a6c139ea8c2872c74bd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -69,22 +69,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1733328505,
|
||||
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -114,11 +98,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1738200030,
|
||||
"narHash": "sha256-z2DVxun8fEH0yeVIyfL68hXht+k2h3vEwNVxJPOMCgU=",
|
||||
"lastModified": 1739314552,
|
||||
"narHash": "sha256-ggVf2BclyIW3jexc/uvgsgJH4e2cuG6Nyg54NeXgbFI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "86a0d627cae02e8cc5d29eeb03de97f8c652a4bb",
|
||||
"rev": "83bd3a26ac0526ae04fa74df46738bb44b89dcdd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -163,11 +147,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1738178255,
|
||||
"narHash": "sha256-+D6Nu2ewXbMTFzx/Q4jDOo+LAOUPr0cxQJg5k33daIE=",
|
||||
"lastModified": 1738664950,
|
||||
"narHash": "sha256-xIeGNM+iivwVHkv9tHwOqoUP5dDrtees34bbFKKMZYs=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprcursor",
|
||||
"rev": "dcadd3398abe146d60c67e0d9ee6e27b301cae82",
|
||||
"rev": "7c6d165e1eb9045a996551eb9f121b6d1b30adc3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -192,11 +176,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1738018829,
|
||||
"narHash": "sha256-5Ol5iahMlELx3lWuChyZsqqLk6sP6aqaJCJFw92OZGo=",
|
||||
"lastModified": 1739049071,
|
||||
"narHash": "sha256-3+7TpXMrbsUXSwgr5VAKAnmkzMb6JO+Rvc9XRb5NMg4=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprgraphics",
|
||||
"rev": "12cd7034e441a5ebfdef1a090c0788413b4a635b",
|
||||
"rev": "175c6b29b6ff82100539e7c4363a35a02c74dd73",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -221,11 +205,11 @@
|
|||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1738192585,
|
||||
"narHash": "sha256-bhlT5u8SHc10eFA695klLlKOm3Wb6um1bxuSgp3D5TU=",
|
||||
"lastModified": 1739285923,
|
||||
"narHash": "sha256-2G2qqyx9MIlWTxNVm+ADZvZSwrNhrV6UtazonxZ9FJ0=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "Hyprland",
|
||||
"rev": "d462cc7fa166e1e6a6f14b58a2dd1e8b92e15426",
|
||||
"rev": "f83fe9986b34c53c67b113a015d54fe8c084e9bd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -246,11 +230,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737556638,
|
||||
"narHash": "sha256-laKgI3mr2qz6tas/q3tuGPxMdsGhBi/w+HO+hO2f1AY=",
|
||||
"lastModified": 1738422629,
|
||||
"narHash": "sha256-5v+bv75wJWvahyM2xcMTSNNxmV8a7hb01Eey5zYnBJw=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-protocols",
|
||||
"rev": "4c75dd5c015c8a0e5a34c6d02a018a650f57feb5",
|
||||
"rev": "755aef8dab49d0fc4663c715fa4ad221b2aedaed",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -314,11 +298,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737981711,
|
||||
"narHash": "sha256-lh6cL5D8nPplB3WovCQjLUZ7k7MViiBrMlpkfm4R7/c=",
|
||||
"lastModified": 1739048983,
|
||||
"narHash": "sha256-REhTcXq4qs3B3cCDtLlYDz0GZvmsBSh947Ub6pQWGTQ=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-qtutils",
|
||||
"rev": "96bf0677fa9cd13508294e3d4559dfbbc8beff73",
|
||||
"rev": "3504a293c8f8db4127cb0f7cfc1a318ffb4316f8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -343,11 +327,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737634606,
|
||||
"narHash": "sha256-W7W87Cv6wqZ9PHegI6rH1+ve3zJPiyevMFf0/HwdbCQ=",
|
||||
"lastModified": 1739048914,
|
||||
"narHash": "sha256-vd5rJBTmp2w7SDgfv23Zcd84ktI5eDA7e5UBzx+pKrU=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprlang",
|
||||
"rev": "f41271d35cc0f370d300413d756c2677f386af9d",
|
||||
"rev": "a7334904d591f38757c46fbe2ab68651877d9099",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -368,11 +352,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737978343,
|
||||
"narHash": "sha256-TfFS0HCEJh63Kahrkp1h9hVDMdLU8a37Zz+IFucxyfA=",
|
||||
"lastModified": 1739048933,
|
||||
"narHash": "sha256-ck6MaoYvISBQKqZR+HcxXnx0wOhyCauxfVMaV5zhJxQ=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprutils",
|
||||
"rev": "6a8bc9d2a4451df12f5179dc0b1d2d46518a90ab",
|
||||
"rev": "e4e018a2ca6f5a9c33511973454199e1c7c85499",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -393,11 +377,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735493474,
|
||||
"narHash": "sha256-fktzv4NaqKm94VAkAoVqO/nqQlw+X0/tJJNAeCSfzK4=",
|
||||
"lastModified": 1739049028,
|
||||
"narHash": "sha256-RleJp7LYbr6s+M1xgbmhtBs+fYa3ZdIiF7+QalJ4D1g=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprwayland-scanner",
|
||||
"rev": "de913476b59ee88685fdc018e77b8f6637a2ae0b",
|
||||
"rev": "04146df74a8d5ec0b579657307be01f1e241125f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -455,11 +439,11 @@
|
|||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1737885589,
|
||||
"narHash": "sha256-Zf0hSrtzaM1DEz8//+Xs51k/wdSajticVrATqDrfQjg=",
|
||||
"lastModified": 1739020877,
|
||||
"narHash": "sha256-mIvECo/NNdJJ/bXjNqIh8yeoSjVLAuDuTUzAo7dzs8Y=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "852ff1d9e153d8875a83602e03fdef8a63f0ecf8",
|
||||
"rev": "a79cfe0ebd24952b580b1cf08cd906354996d547",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -471,11 +455,11 @@
|
|||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1738142207,
|
||||
"narHash": "sha256-NGqpVVxNAHwIicXpgaVqJEJWeyqzoQJ9oc8lnK9+WC4=",
|
||||
"lastModified": 1739214665,
|
||||
"narHash": "sha256-26L8VAu3/1YRxS8MHgBOyOM8xALdo6N0I04PgorE7UM=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9d3ae807ebd2981d593cddd0080856873139aa40",
|
||||
"rev": "64e75cd44acf21c7933d61d7721e812eac1b5a0a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -520,18 +504,17 @@
|
|||
},
|
||||
"spicetify-nix": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1738099675,
|
||||
"narHash": "sha256-q1oixDeEvoKm8t7Fr6vEGnv4sb8vRXCa6rF6YWIbGmk=",
|
||||
"lastModified": 1739223162,
|
||||
"narHash": "sha256-YrbYTM0CkZQG38Ysr2gF4BYdsQDNQtQ4YdQTDgw/zWM=",
|
||||
"owner": "Gerg-L",
|
||||
"repo": "spicetify-nix",
|
||||
"rev": "2f0cc0c110c25804cd2f6c167ab66f567941452c",
|
||||
"rev": "dea717737d04a2a3e877c082bfd2c7f91c1a33ff",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
libreoffice
|
||||
|
||||
# Creative work
|
||||
aseprite
|
||||
# aseprite FIXME: Broken currently
|
||||
blender
|
||||
krita
|
||||
lmms
|
||||
|
|
|
@ -17,25 +17,31 @@
|
|||
## Add directories to $PATH
|
||||
fish_add_path /home/wizardlink/.local/share/scripts \
|
||||
/home/wizardlink/.config/emacs/bin \
|
||||
/home/wizardlink/.spicetify \
|
||||
/home/wizardlink/.nimble/bin \
|
||||
/home/wizardlink/.cargo/bin \
|
||||
/home/wizardlink/.local/bin \
|
||||
/lib/flatpak/exports/bin \
|
||||
/home/wizardlink/.local/share/scripts/burrito \
|
||||
${pkgs.vscode-extensions.vadimcn.vscode-lldb.adapter}/bin
|
||||
/lib/flatpak/exports/bin
|
||||
|
||||
zoxide init --cmd cd fish | source
|
||||
'';
|
||||
|
||||
shellAbbrs = {
|
||||
z = "zoxide";
|
||||
pkg_expr = {
|
||||
position = "anywhere";
|
||||
expansion = "--expr 'with import <nixpkgs> { % }; '";
|
||||
};
|
||||
impure_cmd = {
|
||||
position = "command";
|
||||
expansion = "NIXPKGS_ALLOW_UNFREE=1 nix % --impure";
|
||||
};
|
||||
};
|
||||
|
||||
shellAliases = {
|
||||
del = "trash_file";
|
||||
dev = "nix develop -c fish";
|
||||
doom = "~/.config/emacs/bin/doom";
|
||||
repl = "NIXPKGS_ALLOW_UNFREE=1 nix repl --impure --extra-experimental-features 'flakes' nixpkgs.legacyPackages.x86_64-linux";
|
||||
};
|
||||
|
||||
functions = {
|
||||
|
|
14
modules/home-manager/programs/neovim/.neoconf.json
Normal file
14
modules/home-manager/programs/neovim/.neoconf.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"neoconf": {
|
||||
"plugins": {
|
||||
"lua_ls": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"lspconfig": {
|
||||
"lua_ls": {
|
||||
"Lua.completion.callSnippet": "Replace"
|
||||
}
|
||||
}
|
||||
}
|
5
modules/home-manager/programs/neovim/.stylua.toml
Normal file
5
modules/home-manager/programs/neovim/.stylua.toml
Normal file
|
@ -0,0 +1,5 @@
|
|||
quote_style = "AutoPreferDouble"
|
||||
call_parentheses = "None"
|
||||
|
||||
[sort_requires]
|
||||
enabled = true
|
|
@ -49,6 +49,7 @@ in
|
|||
type = types.enum [
|
||||
"amd"
|
||||
"nvidia"
|
||||
"cpu"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
@ -69,16 +70,20 @@ in
|
|||
# Needed by LuaSnip
|
||||
luajitPackages.jsregexp
|
||||
|
||||
# Treesitter
|
||||
gcc # For compiling languages
|
||||
|
||||
# CMAKE
|
||||
neocmakelsp
|
||||
|
||||
# C/C++
|
||||
clang-tools
|
||||
gcc # Needed for treesitter
|
||||
vscode-extensions.ms-vscode.cpptools
|
||||
|
||||
# C#
|
||||
csharp-ls
|
||||
#csharp-ls Testing roslyn.nvim
|
||||
roslyn-ls
|
||||
rzls
|
||||
csharpier
|
||||
netcoredbg
|
||||
|
||||
|
@ -114,7 +119,7 @@ in
|
|||
rust-analyzer
|
||||
cargo # Needed by blink-cmp
|
||||
taplo
|
||||
vscode-extensions.vadimcn.vscode-lldb
|
||||
#vscode-extensions.vadimcn.vscode-lldb # FIXME: Broken until MR 380775 hits nixpkgs-untable
|
||||
|
||||
# Vue
|
||||
prettierd
|
||||
|
@ -133,6 +138,11 @@ in
|
|||
source = ./lua;
|
||||
};
|
||||
|
||||
xdg.configFile."nvim/queries" = {
|
||||
recursive = true;
|
||||
source = ./queries;
|
||||
};
|
||||
|
||||
xdg.configFile."nvim/lua/plugins/astrolsp.lua".source = pkgs.runCommand "astrolsp.lua" { } ''
|
||||
cp ${./lsp.lua} $out
|
||||
|
||||
|
|
|
@ -10,16 +10,16 @@ return {
|
|||
opts = {
|
||||
-- Configuration table of features provided by AstroLSP
|
||||
features = {
|
||||
autoformat = true, -- enable or disable auto formatting on start
|
||||
codelens = true, -- enable/disable codelens refresh on start
|
||||
inlay_hints = false, -- enable/disable inlay hints on start
|
||||
autoformat = true, -- enable or disable auto formatting on start
|
||||
codelens = true, -- enable/disable codelens refresh on start
|
||||
inlay_hints = false, -- enable/disable inlay hints on start
|
||||
semantic_tokens = true, -- enable/disable semantic token highlighting
|
||||
},
|
||||
-- customize lsp formatting options
|
||||
formatting = {
|
||||
-- control auto formatting on save
|
||||
format_on_save = {
|
||||
enabled = true, -- enable or disable format on save globally
|
||||
enabled = true, -- enable or disable format on save globally
|
||||
allow_filetypes = { -- enable format on save for specified filetypes only
|
||||
-- "go",
|
||||
"c",
|
||||
|
@ -55,7 +55,7 @@ return {
|
|||
"basedpyright",
|
||||
"clangd",
|
||||
"cmake",
|
||||
"csharp_ls",
|
||||
--"csharp_ls", Testing roslyn.nvim
|
||||
"cssls",
|
||||
"denols",
|
||||
"eslint",
|
||||
|
@ -76,6 +76,7 @@ return {
|
|||
---@diagnostic disable: missing-fields
|
||||
config = {
|
||||
-- clangd = { capabilities = { offsetEncoding = "utf-8" } },
|
||||
---@type lspconfig.Config
|
||||
nixd = {
|
||||
settings = {
|
||||
nixd = {
|
||||
|
@ -94,6 +95,7 @@ return {
|
|||
},
|
||||
},
|
||||
},
|
||||
---@type lspconfig.Config
|
||||
vtsls = {
|
||||
filetypes = { "typescript", "javascript", "javascriptreact", "typescriptreact", "vue" },
|
||||
settings = {
|
||||
|
@ -112,6 +114,7 @@ return {
|
|||
},
|
||||
},
|
||||
},
|
||||
---@type lspconfig.Config
|
||||
rust_analyzer = {
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
|
@ -123,6 +126,10 @@ return {
|
|||
},
|
||||
},
|
||||
},
|
||||
---@type lspconfig.Config
|
||||
html = {
|
||||
filetypes = { "html", "templ", "razor" },
|
||||
},
|
||||
},
|
||||
-- customize how language servers are attached
|
||||
handlers = {
|
||||
|
|
|
@ -18,9 +18,11 @@ return {
|
|||
{ import = "astrocommunity.motion.mini-ai" },
|
||||
{ import = "astrocommunity.motion.mini-surround" },
|
||||
|
||||
{ import = "astrocommunity.test.neotest" },
|
||||
|
||||
{ import = "astrocommunity.pack.cmake" },
|
||||
{ import = "astrocommunity.pack.cpp" },
|
||||
{ import = "astrocommunity.pack.cs" },
|
||||
-- { import = "astrocommunity.pack.cs" }, Trying out roslyn.nvim
|
||||
{ import = "astrocommunity.pack.godot" },
|
||||
{ import = "astrocommunity.pack.html-css" },
|
||||
{ import = "astrocommunity.pack.json" },
|
||||
|
|
|
@ -8,8 +8,8 @@ return {
|
|||
},
|
||||
opts = function(_, config)
|
||||
-- config variable is the default configuration table for the setup function call
|
||||
local null_ls = require("null-ls")
|
||||
local helpers = require("null-ls.helpers")
|
||||
local null_ls = require "null-ls"
|
||||
local helpers = require "null-ls.helpers"
|
||||
|
||||
-- local deno_fmt = helpers.make_builtin({
|
||||
-- name = "deno_fmt",
|
||||
|
@ -44,16 +44,18 @@ return {
|
|||
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
|
||||
config.sources = require("astrocore").list_insert_unique(config.sources, {
|
||||
-- Set a formatter
|
||||
require("none-ls.diagnostics.flake8"),
|
||||
require("none-ls.formatting.ruff"),
|
||||
null_ls.builtins.formatting.clang_format.with({
|
||||
require "none-ls.diagnostics.flake8",
|
||||
require "none-ls.formatting.ruff",
|
||||
null_ls.builtins.formatting.clang_format.with {
|
||||
disabled_filetypes = { "cs" },
|
||||
}),
|
||||
},
|
||||
null_ls.builtins.formatting.csharpier,
|
||||
null_ls.builtins.formatting.nixfmt,
|
||||
null_ls.builtins.formatting.stylua,
|
||||
--deno_fmt,
|
||||
null_ls.builtins.formatting.prettierd,
|
||||
null_ls.builtins.formatting.prettierd.with {
|
||||
extra_filetypes = { "razor" },
|
||||
},
|
||||
|
||||
null_ls.builtins.code_actions.statix,
|
||||
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
---@type LazySpec
|
||||
return {
|
||||
"kevinhwang91/nvim-ufo",
|
||||
opts = {
|
||||
provider_selector = function(_, filetype, _)
|
||||
---@type table<string, UfoProviderEnum | UfoProviderEnum[]>
|
||||
local ftDefaults = {
|
||||
cs = "treesitter",
|
||||
}
|
||||
|
||||
local function handleFallbackException(bufnr, err, providerName)
|
||||
if type(err) == "string" and err:match("UfoFallbackException") then
|
||||
return require("ufo").getFolds(bufnr, providerName)
|
||||
else
|
||||
return require("promise").reject(err)
|
||||
end
|
||||
end
|
||||
|
||||
return ftDefaults[filetype]
|
||||
or function(bufnr)
|
||||
return require("ufo")
|
||||
.getFolds(bufnr, "lsp")
|
||||
:catch(function(err)
|
||||
return handleFallbackException(bufnr, err, "treesitter")
|
||||
end)
|
||||
:catch(function(err)
|
||||
return handleFallbackException(bufnr, err, "indent")
|
||||
end)
|
||||
end
|
||||
end,
|
||||
},
|
||||
}
|
135
modules/home-manager/programs/neovim/lua/plugins/roslyn-nvim.lua
Normal file
135
modules/home-manager/programs/neovim/lua/plugins/roslyn-nvim.lua
Normal file
|
@ -0,0 +1,135 @@
|
|||
---@type LazySpec
|
||||
return {
|
||||
{
|
||||
"seblyng/roslyn.nvim",
|
||||
ft = { "cs", "razor" },
|
||||
commit = "490fd2d0f76249032ef6ce503e43ccdaeed9616e",
|
||||
lazy = true,
|
||||
dependencies = {
|
||||
{
|
||||
"tris203/rzls.nvim",
|
||||
config = function()
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
require("rzls").setup {
|
||||
path = vim.fn.getnixpath "rzls" .. "/bin/rzls",
|
||||
}
|
||||
end,
|
||||
},
|
||||
},
|
||||
opts = function(_, opts)
|
||||
local rzlspath = vim.fn.getnixpath "rzls"
|
||||
require("roslyn.config").get()
|
||||
|
||||
opts = {
|
||||
exe = "Microsoft.CodeAnalysis.LanguageServer",
|
||||
args = {
|
||||
"--logLevel=Information",
|
||||
"--extensionLogDirectory=" .. vim.fs.dirname(vim.lsp.get_log_path()),
|
||||
"--razorSourceGenerator=" .. rzlspath .. "/lib/rzls/Microsoft.CodeAnalysis.Razor.Compiler.dll",
|
||||
"--razorDesignTimePath="
|
||||
.. rzlspath
|
||||
.. "/lib/rzls/Targets/Microsoft.NET.Sdk.Razor.DesignTime.targets",
|
||||
},
|
||||
---@type vim.lsp.ClientConfig
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
config = {
|
||||
handlers = require "rzls.roslyn_handlers",
|
||||
settings = {
|
||||
["csharp|inlay_hints"] = {
|
||||
csharp_enable_inlay_hints_for_implicit_object_creation = true,
|
||||
csharp_enable_inlay_hints_for_implicit_variable_types = true,
|
||||
|
||||
csharp_enable_inlay_hints_for_lambda_parameter_types = true,
|
||||
csharp_enable_inlay_hints_for_types = true,
|
||||
dotnet_enable_inlay_hints_for_indexer_parameters = true,
|
||||
dotnet_enable_inlay_hints_for_literal_parameters = true,
|
||||
dotnet_enable_inlay_hints_for_object_creation_parameters = true,
|
||||
dotnet_enable_inlay_hints_for_other_parameters = true,
|
||||
dotnet_enable_inlay_hints_for_parameters = true,
|
||||
dotnet_suppress_inlay_hints_for_parameters_that_differ_only_by_suffix = true,
|
||||
dotnet_suppress_inlay_hints_for_parameters_that_match_argument_name = true,
|
||||
dotnet_suppress_inlay_hints_for_parameters_that_match_method_intent = true,
|
||||
},
|
||||
["csharp|code_lens"] = {
|
||||
dotnet_enable_references_code_lens = true,
|
||||
},
|
||||
},
|
||||
---@class RoslynPatchedClient: vim.lsp.Client
|
||||
---@field patched boolean?
|
||||
|
||||
---@param client RoslynPatchedClient
|
||||
---@param bufnr integer
|
||||
on_attach = function(client, bufnr)
|
||||
-- Call AstroLSP's on_attach so it registers mappings, formatting, etc.
|
||||
require("astrolsp").on_attach(client, bufnr)
|
||||
|
||||
-- HACK: Patch out the `roslyn-ls` LSP client to have proper
|
||||
-- semantic tokens.
|
||||
-- This is a snippet of code taken and modified from:
|
||||
-- https://github.com/seblyng/roslyn.nvim/wiki#semantic-tokens
|
||||
if client.patched then
|
||||
return
|
||||
else
|
||||
client.patched = true
|
||||
end
|
||||
|
||||
-- let the runtime know the server can do semanticTokens/full now
|
||||
client.server_capabilities = vim.tbl_deep_extend("force", client.server_capabilities, {
|
||||
semanticTokensProvider = {
|
||||
full = true,
|
||||
},
|
||||
})
|
||||
|
||||
local lsp_request = client.request
|
||||
|
||||
client.request = function(method, params, handler, req_bufnr)
|
||||
if method ~= vim.lsp.protocol.Methods.textDocument_semanticTokens_full then
|
||||
return lsp_request(method, params, handler, req_bufnr)
|
||||
end
|
||||
|
||||
local target_bufnr = vim.uri_to_bufnr(params.textDocument.uri)
|
||||
local line_count = vim.api.nvim_buf_line_count(target_bufnr)
|
||||
local last_line =
|
||||
vim.api.nvim_buf_get_lines(target_bufnr, line_count - 1, line_count, true)[1]
|
||||
|
||||
local returnvalue = lsp_request("textDocument/semanticTokens/range", {
|
||||
textDocument = params.textDocument,
|
||||
range = {
|
||||
["start"] = {
|
||||
line = 0,
|
||||
character = 0,
|
||||
},
|
||||
["end"] = {
|
||||
line = line_count - 1,
|
||||
character = string.len(last_line) - 1,
|
||||
},
|
||||
},
|
||||
}, handler, req_bufnr)
|
||||
return returnvalue
|
||||
end
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
return opts
|
||||
end,
|
||||
init = function()
|
||||
vim.filetype.add {
|
||||
extension = {
|
||||
razor = "razor",
|
||||
cshtml = "razor",
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-neotest/neotest",
|
||||
dependencies = { "Issafalcon/neotest-dotnet", config = function() end },
|
||||
opts = function(_, opts)
|
||||
if not opts.adapters then
|
||||
opts.adapters = {}
|
||||
end
|
||||
table.insert(opts.adapters, require "neotest-dotnet" (require("astrocore").plugin_opts "neotest-dotnet"))
|
||||
end,
|
||||
},
|
||||
}
|
|
@ -2,50 +2,57 @@
|
|||
|
||||
---@type LazySpec
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
-- add more things to the ensure_installed table protecting against community packs modifying it
|
||||
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, {
|
||||
-- Programming
|
||||
"c",
|
||||
"c_sharp",
|
||||
"cmake",
|
||||
"cpp",
|
||||
"css",
|
||||
"gdscript",
|
||||
"godot_resource",
|
||||
"html",
|
||||
"hyprlang",
|
||||
"javascript",
|
||||
"jsdoc",
|
||||
"lua",
|
||||
"nim",
|
||||
"nim_format_string",
|
||||
"objc",
|
||||
"proto",
|
||||
"python",
|
||||
"svelte",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vue",
|
||||
-- Scripting
|
||||
"bash",
|
||||
"glsl",
|
||||
-- Configuring
|
||||
"dockerfile",
|
||||
"json",
|
||||
"jsonc",
|
||||
"nix",
|
||||
"vhs",
|
||||
"yaml",
|
||||
-- Misc
|
||||
"cuda",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"query",
|
||||
-- VIM
|
||||
"vim",
|
||||
"vimdoc",
|
||||
})
|
||||
end,
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
---@param _ LazyPlugin
|
||||
---@param opts TSConfig
|
||||
opts = function(_, opts)
|
||||
-- disable automatically installing parsers
|
||||
opts.auto_install = false
|
||||
|
||||
-- add more things to the ensure_installed table protecting against community packs modifying it
|
||||
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed --[[@as string[]], {
|
||||
-- Programming
|
||||
"c",
|
||||
"c_sharp",
|
||||
"cmake",
|
||||
"cpp",
|
||||
"css",
|
||||
"gdscript",
|
||||
"godot_resource",
|
||||
"html",
|
||||
"hyprlang",
|
||||
"javascript",
|
||||
"jsdoc",
|
||||
"lua",
|
||||
"nim",
|
||||
"nim_format_string",
|
||||
"objc",
|
||||
"proto",
|
||||
"python",
|
||||
"razor",
|
||||
"svelte",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vue",
|
||||
-- Scripting
|
||||
"bash",
|
||||
"fish",
|
||||
"glsl",
|
||||
-- Configuring
|
||||
"dockerfile",
|
||||
"json",
|
||||
"jsonc",
|
||||
"nix",
|
||||
"vhs",
|
||||
"yaml",
|
||||
-- Misc
|
||||
"cuda",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"query",
|
||||
-- VIM
|
||||
"vim",
|
||||
"vimdoc",
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ return {
|
|||
{
|
||||
"xiyaowong/transparent.nvim",
|
||||
opts = function(_, opts)
|
||||
local transparent = require("transparent")
|
||||
local transparent = require "transparent"
|
||||
|
||||
opts.groups = {
|
||||
"Comment",
|
||||
|
@ -150,9 +150,9 @@ return {
|
|||
"WinSeparator",
|
||||
}
|
||||
|
||||
transparent.clear_prefix("BufferLine")
|
||||
transparent.clear_prefix("Diagnostic")
|
||||
transparent.clear_prefix("NvimTree")
|
||||
transparent.clear_prefix "BufferLine"
|
||||
transparent.clear_prefix "Diagnostic"
|
||||
transparent.clear_prefix "NvimTree"
|
||||
end,
|
||||
},
|
||||
|
||||
|
@ -160,10 +160,9 @@ return {
|
|||
{
|
||||
"jmbuhr/otter.nvim",
|
||||
dependencies = {
|
||||
"hrsh7th/nvim-cmp",
|
||||
"neovim/nvim-lspconfig",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- Adds highlighting and custom commands for ledger files
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
-- fit in the normal config locations above can go here
|
||||
|
||||
-- Set up custom filetypes
|
||||
vim.filetype.add({
|
||||
vim.filetype.add {
|
||||
extension = {
|
||||
foo = "fooscript",
|
||||
},
|
||||
|
@ -13,9 +13,75 @@ vim.filetype.add({
|
|||
pattern = {
|
||||
["~/%.config/foo/.*"] = "fooscript",
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
local dap = require("dap")
|
||||
--- Define PackageOutput
|
||||
--- @enum PackageOutput
|
||||
local PACKAGEOUTPUT = {
|
||||
out = 0,
|
||||
lib = 1,
|
||||
}
|
||||
|
||||
--- Get the store path of a package
|
||||
--- @param packagename NixSearchExceptions | string
|
||||
--- @param packageoutput PackageOutput?
|
||||
--- @return string | nil
|
||||
vim.fn.getnixpath = function(packagename, packageoutput)
|
||||
---@enum (key) NixSearchExceptions
|
||||
local exceptions = {}
|
||||
|
||||
return vim.split(
|
||||
vim.api.nvim_cmd(
|
||||
vim.api.nvim_parse_cmd(
|
||||
string.format(
|
||||
"silent !nix eval --raw --expr 'with import <nixpkgs> { }; (%s).%s' --impure",
|
||||
exceptions[packagename] or packagename,
|
||||
(packageoutput == PACKAGEOUTPUT.out or packageoutput == nil) and "outPath"
|
||||
or string.format("lib.getLib %s", packagename)
|
||||
),
|
||||
{}
|
||||
),
|
||||
{
|
||||
output = true,
|
||||
}
|
||||
),
|
||||
"\n"
|
||||
)[3]
|
||||
end
|
||||
|
||||
--- Helper function to allow me to run commands grabbed
|
||||
--- by the current selection.
|
||||
--- @param isLua boolean
|
||||
--- @return string
|
||||
vim.fn.runcmdonmark = function(isLua)
|
||||
local beginRow, beginCol = unpack(vim.api.nvim_buf_get_mark(0, "<"))
|
||||
local endRow, endCol = unpack(vim.api.nvim_buf_get_mark(0, ">"))
|
||||
|
||||
if beginRow == nil or beginCol == nil or endRow == nil or endCol == nil then
|
||||
return ""
|
||||
end
|
||||
|
||||
local text = table.concat(
|
||||
vim.tbl_map(function(incoming)
|
||||
return vim.trim(incoming)
|
||||
end, vim.api.nvim_buf_get_text(0, beginRow - 1, beginCol, endRow - 1, endCol + 1, {})),
|
||||
" "
|
||||
)
|
||||
|
||||
vim.notify("Running expression: " .. text, vim.log.levels.INFO)
|
||||
|
||||
return vim.api.nvim_cmd(
|
||||
vim.api.nvim_parse_cmd((isLua == true and ":lua " or "") .. text, {}) --[[@as vim.api.keyset.cmd]],
|
||||
{}
|
||||
)
|
||||
end
|
||||
|
||||
--- Register the function as a command as well, to facilitate things.
|
||||
vim.api.nvim_create_user_command("RunCmdOnMark", function(opts)
|
||||
vim.fn.runcmdonmark((opts.args == "v:false" or opts.args == "false") and false or true)
|
||||
end, { range = true, nargs = "?" })
|
||||
|
||||
local dap = require "dap"
|
||||
|
||||
-- @type DapAdapter
|
||||
dap.adapters.codelldb = {
|
||||
|
@ -36,7 +102,7 @@ dap.adapters.cppdbg = {
|
|||
}
|
||||
|
||||
-- @type DapAdapter
|
||||
dap.adapters.coreclr = {
|
||||
dap.adapters.netcoredbg = {
|
||||
type = "executable",
|
||||
command = "netcoredbg",
|
||||
args = { "--interpreter=vscode" },
|
||||
|
@ -94,13 +160,23 @@ dap.configurations.c = dap.configurations.cpp
|
|||
-- @type DapConfiguration
|
||||
dap.configurations.cs = {
|
||||
{
|
||||
type = "coreclr",
|
||||
name = "launch - netcoredbg",
|
||||
type = "netcoredbg",
|
||||
name = "Launch DLL",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return vim.fn.input("Path to dll", vim.fn.getcwd() .. "/bin/Debug/", "file")
|
||||
end,
|
||||
},
|
||||
{
|
||||
type = "netcoredbg",
|
||||
name = "Attach to debugger",
|
||||
request = "attach",
|
||||
program = function()
|
||||
return vim.fn.input("Path to dll", vim.fn.getcwd() .. "/bin/Debug/", "file")
|
||||
end,
|
||||
pid = "${command:pickProcess}",
|
||||
cwd = "${workspaceFolder}",
|
||||
},
|
||||
}
|
||||
|
||||
-- @type DapConfiguration
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
;; extends
|
||||
|
||||
; Capture entire regions for folding
|
||||
(
|
||||
(preproc_region) @region_begin
|
||||
.
|
||||
[
|
||||
(declaration)
|
||||
(type_declaration)
|
||||
]*
|
||||
.
|
||||
(preproc_endregion) @region_end
|
||||
(#make-range! "fold" @region_begin @region_end)
|
||||
)
|
|
@ -126,6 +126,7 @@
|
|||
|
||||
# Enable ollama support
|
||||
ollama.enable = true;
|
||||
ollama.type = "cpu";
|
||||
};
|
||||
|
||||
modules.hyprland = {
|
||||
|
|
|
@ -27,5 +27,10 @@
|
|||
services.jellyseerr = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
package = pkgs.jellyseerr.overrideAttrs (
|
||||
_final: _prev: {
|
||||
dontCheckForBrokenSymlinks = true;
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue