nvim: fix packer
This commit is contained in:
parent
61a1d8ce3b
commit
6518e6e448
1 changed files with 17 additions and 33 deletions
|
@ -3,8 +3,8 @@
|
|||
local fn = vim.fn
|
||||
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
PackerBootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
|
||||
vim.cmd 'packadd packer.nvim'
|
||||
packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
|
||||
vim.cmd [[packadd packer.nvim]]
|
||||
end
|
||||
-- }}
|
||||
|
||||
|
@ -22,15 +22,13 @@ return require('packer').startup({function()
|
|||
}
|
||||
|
||||
-- Packer
|
||||
-- use 'wbthomason/packer.nvim',
|
||||
use { -- packer: plugin manager
|
||||
'wbthomason/packer.nvim',
|
||||
config = function()
|
||||
-- Map :PS to :PackerSync
|
||||
vim.cmd 'command! PS PackerSync'
|
||||
require("packer").init({
|
||||
autoremove = true,
|
||||
})
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
-- Colors (decorations)
|
||||
|
@ -214,7 +212,7 @@ return require('packer').startup({function()
|
|||
require('blake.dap').nvim_dap()
|
||||
end
|
||||
}
|
||||
-- use { -- dap-buddy: DAP adapter installer
|
||||
-- use { -- dap-buddy: DAP adapter installer - DBInstall
|
||||
-- 'Pocco81/dap-buddy.nvim',
|
||||
-- config = function()
|
||||
-- require('blake.dap').dap_buddy()
|
||||
|
@ -228,6 +226,7 @@ return require('packer').startup({function()
|
|||
}
|
||||
use { -- nvim-dap-ui: a UI for nvim-dap
|
||||
'rcarriga/nvim-dap-ui',
|
||||
requires = {"mfussenegger/nvim-dap"},
|
||||
config = function()
|
||||
require('blake.dap').dap_ui()
|
||||
end,
|
||||
|
@ -392,25 +391,10 @@ return require('packer').startup({function()
|
|||
'numToStr/Comment.nvim',
|
||||
config = function()
|
||||
require('Comment').setup {
|
||||
pre_hook = function(ctx)
|
||||
-- Only calculate commentstring for tsx filetypes
|
||||
if vim.bo.filetype == 'typescriptreact' then
|
||||
local U = require('Comment.utils')
|
||||
-- Detemine whether to use linewise or blockwise commentstring
|
||||
local type = ctx.ctype == U.ctype.line and '__default' or '__multiline'
|
||||
-- Determine the location where to calculate commentstring from
|
||||
local location = nil
|
||||
if ctx.ctype == U.ctype.block then
|
||||
location = require('ts_context_commentstring.utils').get_cursor_location()
|
||||
elseif ctx.cmotion == U.cmotion.v or ctx.cmotion == U.cmotion.V then
|
||||
location = require('ts_context_commentstring.utils').get_visual_start_location()
|
||||
end
|
||||
return require('ts_context_commentstring.internal').calculate_commentstring({
|
||||
key = type,
|
||||
location = location,
|
||||
})
|
||||
end
|
||||
end,
|
||||
mappings = {
|
||||
extra = true,
|
||||
extended = true,
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
|
@ -495,7 +479,7 @@ return require('packer').startup({function()
|
|||
|
||||
|
||||
-- Bootstrap packer if needed {
|
||||
if (PackerBootstrap) then
|
||||
if (packer_bootstrap) then
|
||||
require('packer').sync()
|
||||
end
|
||||
-- }
|
||||
|
|
Loading…
Add table
Reference in a new issue