Przeglądaj źródła

nixpkgs/neovim: automatically trust .nvim.lua we write

Thomas Dy 1 dzień temu
rodzic
commit
4776d1e2e4
1 zmienionych plików z 6 dodań i 0 usunięć
  1. 6 0
      .config/nixpkgs/neovim/config/lua/user/exrc.lua

+ 6 - 0
.config/nixpkgs/neovim/config/lua/user/exrc.lua

@@ -17,3 +17,9 @@ if #dirs == 1 then
     end
   end
 end
+
+-- automatically trust configs we save
+vim.api.nvim_create_autocmd('BufWritePost', {
+  pattern = '.nvim.lua',
+  command = 'trust',
+})