Skip to content

Commit

Permalink
fix: fix sourcing our runtime files (#1679)
Browse files Browse the repository at this point in the history
* fix: fix sourcing our runtime files

* refactor: use runtime!
  • Loading branch information
xiyaowong committed Dec 5, 2023
1 parent 9aa4463 commit 567fea5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
File renamed without changes.
8 changes: 4 additions & 4 deletions vim/vscode-neovim.vim
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ let s:currDir = fnamemodify(resolve(expand('<sfile>:p')), ':h')
" Adjust rtp path
let &runtimepath = &runtimepath . ',' . s:currDir . '/vim-altercmd'

let s:luaPath = fnamemodify(s:currDir, ':h') . '/runtime'
let &runtimepath = &runtimepath . ',' . s:luaPath
let s:runtimePath = fnamemodify(s:currDir, ':h') . '/runtime'
let &runtimepath = &runtimepath . ',' . s:runtimePath

" Used for externsion inter-communications
let s:vscodePluginEventName = 'vscode-neovim'
Expand Down Expand Up @@ -109,9 +109,9 @@ augroup VscodeGeneral
autocmd VimEnter,ModeChanged * call VSCodeExtensionNotify('mode-changed', mode())
autocmd WinEnter * call VSCodeExtensionNotify('window-changed', win_getid())
" LazyVim will clear runtimepath by default. To avoid user intervention, we need to set it again.
autocmd User LazyDone let &runtimepath = &runtimepath . ',' . s:luaPath
autocmd User LazyDone let &runtimepath = &runtimepath . ',' . s:runtimePath
augroup END


lua require("vscode-neovim")
execute 'source ' . fnamemodify(s:currDir, ':h') . '/runtime/plugin/*.lua'
runtime! modules/**/*.{vim,lua}

0 comments on commit 567fea5

Please sign in to comment.