1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-22 21:11:32 +08:00

fix(nvim-plug): fix buf modifiable opt

This commit is contained in:
Eric Wong 2025-02-15 15:43:44 +08:00
parent 7d3c1c9985
commit 41bd11ad55
No known key found for this signature in database
GPG Key ID: 41BB7053E835C848
2 changed files with 5 additions and 15 deletions

View File

@ -99,6 +99,7 @@ M.open = function()
end
if vim.api.nvim_buf_is_valid(bufnr) then
vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, build_context())
vim.api.nvim_set_option_value('modifiable', false, { buf = bufnr})
end
--- setup highlight
if vim.fn.hlexists('PlugTitle') == 0 then
@ -128,7 +129,9 @@ end
M.on_update = function(name, data)
plugin_status[name] = vim.tbl_deep_extend('force', plugin_status[name] or {}, data)
if vim.api.nvim_buf_is_valid(bufnr) then
vim.api.nvim_set_option_value('modifiable', true, { buf = bufnr})
vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, build_context())
vim.api.nvim_set_option_value('modifiable', false, { buf = bufnr})
end
end

View File

@ -5,17 +5,8 @@
-- License: GPLv3
--=============================================================================
if vim.fn.isdirectory('D:/bundle_dir/wsdjeg/nvim-plug') == 0 then
vim.fn.system({
'git',
'clone',
'--depth',
'1',
'https://github.com/wsdjeg/nvim-plug.git',
'D:/bundle_dir/wsdjeg/nvim-plug',
})
end
vim.opt.runtimepath:append('D:/bundle_dir/wsdjeg/nvim-plug')
vim.opt.runtimepath:append('.')
vim.opt.runtimepath:append('~/.SpaceVim')
require('plug').setup({
@ -42,10 +33,6 @@ require('plug').add({
'wsdjeg/git.vim',
cmds = { 'Git' },
},
{
'wsdjeg/nvim-plug',
fetch = true,
},
{
'wsdjeg/JavaUnit.vim',
cmds = { 'JavaUnit' },