From 5dcb3fa77cc167f40533f44223d9a71d515088b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thea=20Sch=C3=B6bl?= Date: Tue, 26 Mar 2024 19:36:27 +0100 Subject: [PATCH] feat: add more info --- README.md | 5 ++- home/programs/nixvim/default.nix | 61 ++++++++++++++------------------ 2 files changed, 31 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 0e213c6..f723dd3 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,12 @@ nix.settings.experimental-features = [ "nix-command" "flakes" ]; ``` ```sh +sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos +sudo nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs + git clone git@github.com:Theaninova/home-manager-config.git ~/.config/home-manager cd ~/.config/home-manager -sudo nixos-rebuild switch --flake .# +sudo nixos-rebuild switch --flake .#MONSTER ``` After that reload the shell diff --git a/home/programs/nixvim/default.nix b/home/programs/nixvim/default.nix index 4eeb5ad..e97ffcf 100644 --- a/home/programs/nixvim/default.nix +++ b/home/programs/nixvim/default.nix @@ -286,20 +286,18 @@ in { "" ]; on_new_config = { - __raw = - # lua - '' - function(new_config, new_root_dir) - new_config.cmd = { - new_root_dir .. "/node_modules/@angular/language-server/bin/ngserver", - "--stdio", - "--tsProbeLocations", - new_root_dir .. "/node_modules", - "--ngProbeLocations", - new_root_dir .. "/node_modules", - } - end - ''; + __raw = '' + function(new_config, new_root_dir) + new_config.cmd = { + new_root_dir .. "/node_modules/@angular/language-server/bin/ngserver", + "--stdio", + "--tsProbeLocations", + new_root_dir .. "/node_modules", + "--ngProbeLocations", + new_root_dir .. "/node_modules", + } + end + ''; }; filetypes = [ "typescript" @@ -310,15 +308,13 @@ in { "html.angular" ]; on_attach = { - __raw = - # lua - '' - function(client, bufnr) - if vim.bo[bufnr].filetype == "html" then - vim.bo[bufnr].filetype = "angular" - end + __raw = '' + function(client, bufnr) + if vim.bo[bufnr].filetype == "html" then + vim.bo[bufnr].filetype = "angular" end - ''; + end + ''; }; }; }]; @@ -354,18 +350,16 @@ in { enable = true; mode = "symbol_text"; cmp = { - after = - # lua - '' - function(entry, vim_item, kind) - if entry.source.name == "npm" then - kind.kind = "" - kind.kind_hl_group = "CmpItemKindNpm" - end - kind.kind = kind.kind .. " " - return kind + after = '' + function(entry, vim_item, kind) + if entry.source.name == "npm" then + kind.kind = "" + kind.kind_hl_group = "CmpItemKindNpm" end - ''; + kind.kind = kind.kind .. " " + return kind + end + ''; }; symbolMap = { Copilot = ""; }; }; @@ -395,7 +389,6 @@ in { ]; formatting.fields = [ "abbr" "kind" ]; snippet.expand = - # lua "function(args) require('luasnip').lsp_expand(args.body) end"; window = { completion.border = "rounded";