From 59111f5da62d865a94835f30a2429dda6b6febff Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Sun, 14 Jan 2024 22:33:50 -0500 Subject: [PATCH] remove snippets from neovim i never used them anyway --- flake.lock | 17 ----------------- flake.nix | 4 ---- modules/common/neovim/config/completion.nix | 17 ----------------- overlays/neovim-plugins.nix | 2 -- 4 files changed, 40 deletions(-) diff --git a/flake.lock b/flake.lock index 252f9d8..f90646f 100644 --- a/flake.lock +++ b/flake.lock @@ -549,7 +549,6 @@ "tree-sitter-puppet": "tree-sitter-puppet", "tree-sitter-python": "tree-sitter-python", "tree-sitter-rasi": "tree-sitter-rasi", - "vscode-terraform-snippets": "vscode-terraform-snippets", "wallpapers": "wallpapers", "wsl": "wsl", "zenyd-mpv-scripts": "zenyd-mpv-scripts" @@ -774,22 +773,6 @@ "type": "github" } }, - "vscode-terraform-snippets": { - "flake": false, - "locked": { - "lastModified": 1614849738, - "narHash": "sha256-v392tyzXV+zyBNt5OCB2NBCK7JcByrTa5Ne/nFtSCJI=", - "owner": "run-at-scale", - "repo": "vscode-terraform-doc-snippets", - "rev": "6ab3e44b566e660f38922cf908e6e547eaa5d4b4", - "type": "github" - }, - "original": { - "owner": "run-at-scale", - "repo": "vscode-terraform-doc-snippets", - "type": "github" - } - }, "wallpapers": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 5d82ddf..b720804 100644 --- a/flake.nix +++ b/flake.nix @@ -113,10 +113,6 @@ url = "github:kyazdani42/nvim-tree.lua"; flake = false; }; - vscode-terraform-snippets = { - url = "github:run-at-scale/vscode-terraform-doc-snippets"; - flake = false; - }; hmts-nvim-src = { url = "github:calops/hmts.nvim"; flake = false; diff --git a/modules/common/neovim/config/completion.nix b/modules/common/neovim/config/completion.nix index a982437..ba4eae9 100644 --- a/modules/common/neovim/config/completion.nix +++ b/modules/common/neovim/config/completion.nix @@ -9,7 +9,6 @@ pkgs.vimPlugins.luasnip pkgs.vimPlugins.cmp_luasnip pkgs.vimPlugins.cmp-rg - pkgs.vimPlugins.friendly-snippets ]; use.cmp.setup = dsl.callWith { @@ -24,13 +23,6 @@ end ''; - # Enable Luasnip snippet completion - snippet.expand = dsl.rawLua '' - function(args) - require("luasnip").lsp_expand(args.body) - end - ''; - # Basic completion keybinds mapping = { "['']" = dsl.rawLua @@ -70,7 +62,6 @@ sources = [ { name = "nvim_lua"; } # Fills in common Neovim lua functions { name = "nvim_lsp"; } # LSP results - { name = "luasnip"; } # Snippets { name = "path"; } # Shell completion from current PATH { name = "buffer"; # Grep for text from the current text buffer @@ -119,7 +110,6 @@ } vim_item.kind = string.format("%s", kind_icons[vim_item.kind]) vim_item.menu = ({ - luasnip = "[Snippet]", buffer = "[Buffer]", path = "[Path]", rg = "[Grep]", @@ -139,13 +129,6 @@ }; lua = '' - -- Load snippets - -- Check status: :lua require("luasnip").log.open() - require("luasnip.loaders.from_vscode").lazy_load() - require("luasnip.loaders.from_vscode").lazy_load({ paths = { "${ - builtins.toString pkgs.vscode-terraform-snippets - }" } }) - -- Use buffer source for `/` require('cmp').setup.cmdline("/", { sources = { diff --git a/overlays/neovim-plugins.nix b/overlays/neovim-plugins.nix index 7c7cb6f..3f0a460 100644 --- a/overlays/neovim-plugins.nix +++ b/overlays/neovim-plugins.nix @@ -17,8 +17,6 @@ let in { nil = inputs.nil.packages.${prev.system}.nil; - vscode-terraform-snippets = inputs.vscode-terraform-snippets; - nvim-lspconfig = withSrc prev.vimPlugins.nvim-lspconfig inputs.nvim-lspconfig; cmp-nvim-lsp = withSrc prev.vimPlugins.cmp-nvim-lsp inputs.cmp-nvim-lsp; null-ls-nvim = withSrc prev.vimPlugins.null-ls-nvim inputs.null-ls-nvim;