chore(nvim): switch to numToStr/Comment.nvim
This commit is contained in:
parent
141e4f7310
commit
2d9f2a995e
14
nvim/.config/nvim/after/plugin/comment.lua
Normal file
14
nvim/.config/nvim/after/plugin/comment.lua
Normal file
|
@ -0,0 +1,14 @@
|
|||
require 'Comment'.setup {
|
||||
padding = true,
|
||||
|
||||
opleader = {
|
||||
line = 'gc',
|
||||
block = 'gb',
|
||||
},
|
||||
|
||||
mappings = {
|
||||
basic = true,
|
||||
extra = true,
|
||||
extended = false,
|
||||
},
|
||||
}
|
|
@ -13,9 +13,9 @@ require('packer').startup(function()
|
|||
use 'machakann/vim-highlightedyank'
|
||||
use 'miyakogi/seiya.vim'
|
||||
use 'norcalli/nvim-colorizer.lua'
|
||||
use 'numToStr/Comment.nvim'
|
||||
use 'nvim-lua/plenary.nvim'
|
||||
use 'nvim-lua/popup.nvim'
|
||||
use 'preservim/nerdcommenter'
|
||||
use 'sheerun/vim-polyglot'
|
||||
use 'tpope/vim-surround'
|
||||
use 'vim-test/vim-test'
|
||||
|
@ -34,7 +34,6 @@ require('packer').startup(function()
|
|||
use 'ThePrimeagen/harpoon'
|
||||
|
||||
-- Treesitter
|
||||
use 'JoosepAlviste/nvim-ts-context-commentstring'
|
||||
use {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
run = ':TSUpdate',
|
||||
|
|
|
@ -57,7 +57,7 @@ end
|
|||
time([[Luarocks path setup]], false)
|
||||
time([[try_loadstring definition]], true)
|
||||
local function try_loadstring(s, component, name)
|
||||
local success, result = pcall(loadstring(s))
|
||||
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
|
||||
if not success then
|
||||
vim.schedule(function()
|
||||
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
|
||||
|
@ -69,6 +69,11 @@ end
|
|||
time([[try_loadstring definition]], false)
|
||||
time([[Defining packer_plugins]], true)
|
||||
_G.packer_plugins = {
|
||||
["Comment.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/Comment.nvim",
|
||||
url = "https://github.com/numToStr/Comment.nvim"
|
||||
},
|
||||
LuaSnip = {
|
||||
loaded = true,
|
||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/LuaSnip",
|
||||
|
@ -134,11 +139,6 @@ _G.packer_plugins = {
|
|||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/lspkind-nvim",
|
||||
url = "https://github.com/onsails/lspkind-nvim"
|
||||
},
|
||||
nerdcommenter = {
|
||||
loaded = true,
|
||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/nerdcommenter",
|
||||
url = "https://github.com/preservim/nerdcommenter"
|
||||
},
|
||||
["nvim-cmp"] = {
|
||||
loaded = true,
|
||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/nvim-cmp",
|
||||
|
@ -159,11 +159,6 @@ _G.packer_plugins = {
|
|||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
|
||||
url = "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||
},
|
||||
["nvim-ts-context-commentstring"] = {
|
||||
loaded = true,
|
||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/nvim-ts-context-commentstring",
|
||||
url = "https://github.com/JoosepAlviste/nvim-ts-context-commentstring"
|
||||
},
|
||||
["nvim-web-devicons"] = {
|
||||
loaded = true,
|
||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
|
||||
|
|
Loading…
Reference in a new issue