From ae3d65356b7e38915284f2d5ee1265fe20efd692 Mon Sep 17 00:00:00 2001 From: xqtc161 Date: Mon, 18 Mar 2024 18:23:29 +0100 Subject: [PATCH 1/2] comment-nvim; lsp rename --- home/modules/nixvim.nix | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/home/modules/nixvim.nix b/home/modules/nixvim.nix index 2ef257d..39d832c 100644 --- a/home/modules/nixvim.nix +++ b/home/modules/nixvim.nix @@ -27,6 +27,9 @@ enable = true; dir = "~/Documents/Obsidian Vault/"; }; + comment-nvim = { + enable = true; + }; indent-blankline.enable = true; lualine.enable = true; lsp-format = {enable = true;}; @@ -69,8 +72,8 @@ settings = { snippet = { - expand = "function(args) require('luasnip').lsp_expand(args.body) end"; - }; + expand = "function(args) require('luasnip').lsp_expand(args.body) end"; + }; sources = [ {name = "nvim_lsp";} {name = "path";} @@ -86,8 +89,8 @@ #}; mapping = { "" = '' - cmp.mapping.confirm({ select = true }) - ''; + cmp.mapping.confirm({ select = true }) + ''; "" = '' function(fallback) local luasnip = require('luasnip') @@ -338,6 +341,15 @@ key = "Y"; action = ''[["+Y]]''; } + { + mode = ["n"]; + key = "sr"; + action = '' function() + vim.lsp.buf.rename() + end + ''; + lua = true; + } ]; }; } From 026a8ee602420276c9f8e8487d94e9b3731a0577 Mon Sep 17 00:00:00 2001 From: xqtc161 Date: Mon, 18 Mar 2024 22:00:33 +0100 Subject: [PATCH 2/2] add cachix --- common/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/default.nix b/common/default.nix index f1cab42..8aaea04 100644 --- a/common/default.nix +++ b/common/default.nix @@ -6,4 +6,13 @@ ... }: { nixpkgs.config.permittedInsecurePackages = ["electron-25.9.0" "electron-24.8.6"]; + nix.settings = { + trusted-users = [ "xqtc" ]; + substituters = [ + "https://nix-community.cachix.org" + ]; + trusted-public-keys = [ + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + }; }