Skip to content

Commit

Permalink
feat(plugin): remove snippets
Browse files Browse the repository at this point in the history
Don't really use snippets, will be using copilot at some point too ...
we'll see how it goes
  • Loading branch information
vinnyA3 committed Feb 23, 2024
1 parent 1882642 commit 1bafb2e
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 704 deletions.
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,4 @@ nvim
│   │   ├── commands.lua // custom user au commands
│   │   ├── utils.lua // helpers and utitlies for config usage
│   │   └── remap.lua // main keybindings & remaps
└── snippets // custom & community snippets
├── javascript
│   ├── javascript.node.snippets
│   ├── javascript-react.snippets
│   └── javascript.snippets
├── typescriptreact.snippets
└── typescript.snippets
```
10 changes: 0 additions & 10 deletions after/plugin/completion.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
local cmp = require'cmp' -- nvim-cmp
local luasnip = require'luasnip' -- luasnip

-- Didn't really feel like installing another plug for icons
local kind_icons = {
Expand Down Expand Up @@ -43,32 +42,24 @@ end

local select_next_item = cmp.mapping(function(fallback)
if cmp.visible() then cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then luasnip.expand_or_jump()
elseif has_words_before() then cmp.complete()
else fallback()
end
end, { "i", "s"})

local select_prev_item = function()
if cmp.visible() then cmp.select_prev_item()
elseif luasnip.expand_or_jumpable() then luasnip.expand_or_jump()
elseif has_words_before() then cmp.complete()
else fallback()
end
end

cmp.setup {
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
sources = {
{ name = 'luasnip' },
{ name = 'nvim_lsp' },
{ name = 'path' },
{
Expand Down Expand Up @@ -105,7 +96,6 @@ cmp.setup {
)

vim_item.menu = ({
luasnip = '[Snippet]',
buffer = '[Buffer]',
nvim_lsp = '[LSP]',
path = '[Path]',
Expand Down
14 changes: 6 additions & 8 deletions lazy-lock.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"LuaSnip": { "branch": "master", "commit": "f3b3d3446bcbfa62d638b1903ff00a78b2b730a1" },
"alpha-nvim": { "branch": "main", "commit": "1356b9ef31b985d541d94314f2cf73c61124bf1d" },
"catppuccin": { "branch": "main", "commit": "9703f227bfab20d04bcee62d2f08f1795723b4ae" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"copilot.vim": { "branch": "release", "commit": "315c6d2b16e018cb8020f20aaa7081ebc4070828" },
"emmet-vim": { "branch": "master", "commit": "def5d57a1ae5afb1b96ebe83c4652d1c03640f4d" },
"firenvim": { "branch": "master", "commit": "f2dd6d3bcf3309a7dd30c79b3b3c03ab55cea6e2" },
Expand All @@ -18,18 +16,18 @@
"lir.nvim": { "branch": "master", "commit": "969e95bd07ec315b5efc53af69c881278c2b74fa" },
"lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" },
"mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
"none-ls.nvim": { "branch": "main", "commit": "34b1311bd07bd3741e60e06b34d0709d6e5a9f0f" },
"nvim-autopairs": { "branch": "master", "commit": "096d0baecc34f6c5d8a6dd25851e9d5ad338209b" },
"none-ls.nvim": { "branch": "main", "commit": "bb680d752cec37949faca7a1f509e2fe67ab418a" },
"nvim-autopairs": { "branch": "master", "commit": "90f824d37c0cb079d2764927e73af77faa9ba0ef" },
"nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" },
"nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" },
"nvim-lspconfig": { "branch": "master", "commit": "d1bab4cf4b69e49d6058028fd933d8ef5e74e680" },
"nvim-treesitter": { "branch": "master", "commit": "504fe1043298c468f56a6ef6dc61f35b2d69495a" },
"nvim-web-devicons": { "branch": "master", "commit": "7f30f2da3c3641841ceb0e2c150281f624445e8f" },
"nvim-lspconfig": { "branch": "master", "commit": "6b9f4bbe0aa1f351fd4845dc5fd4f3450b010f88" },
"nvim-treesitter": { "branch": "master", "commit": "9ecf980277d70f5a540b4e8deaace708432d54c0" },
"nvim-web-devicons": { "branch": "master", "commit": "14ac5887110b06b89a96881d534230dac3ed134d" },
"plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" },
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
"registers.nvim": { "branch": "main", "commit": "22bb98f93a423252fffeb3531f7bc12a3e07b63f" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
"telescope.nvim": { "branch": "master", "commit": "b744cf59752aaa01561afb4223006de26f3836fd" },
"telescope.nvim": { "branch": "master", "commit": "a5b69afa484038f1c4793e979d023edb478ebc0c" },
"todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" },
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
"vim-fugitive": { "branch": "master", "commit": "011cf4fcb93a9649ffc6dcdff56ef948f5d0f7cc" },
Expand Down
2 changes: 0 additions & 2 deletions lua/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ return {
})
end
},
'L3MON4D3/LuaSnip',
{
'hrsh7th/nvim-cmp',
dependencies = {
Expand All @@ -22,7 +21,6 @@ return {
'hrsh7th/cmp-path'
}
},
'saadparwaiz1/cmp_luasnip',
{
'nvimtools/none-ls.nvim',
dependencies = {
Expand Down
9 changes: 0 additions & 9 deletions lua/vin/commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,3 @@ vim.api.nvim_create_autocmd("FileType", {
group = augroup,
command = "compiler tsc | setlocal makeprg=npx\\ tsc",
})

-- Plugin Dependent User Commands
-- Load Snippets (requires luasnip)
vim.api.nvim_create_user_command(
'Snippets',
'lua require("luasnip.loaders.from_snipmate").load()',
{}
)

190 changes: 0 additions & 190 deletions snippets/javascript/javascript-react.snippets

This file was deleted.

51 changes: 0 additions & 51 deletions snippets/javascript/javascript.node.snippets

This file was deleted.

Loading

0 comments on commit 1bafb2e

Please sign in to comment.