mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-23 19:21:53 +03:00
Merge branch 'master' into update-neovim
This commit is contained in:
commit
6747dfc57a
34
DEVELOP.md
34
DEVELOP.md
@ -1,32 +1,12 @@
|
||||
## How to develop
|
||||
|
||||
### No change in NvimServer
|
||||
|
||||
If you did not change NvimServer, i.e. NvimServer, NvimServerTypes, and neovim,
|
||||
then, do the following to run VimR:
|
||||
|
||||
* `./bin/download_nvimserver.sh`
|
||||
* Run VimR scheme in Xcode
|
||||
|
||||
A development version of VimR will be built and run,
|
||||
i.e. the bundle identifier will be `com.qvacua.VimR.dev` and the name of the app will be `VimR-dev`.
|
||||
If you want to build a development version as a release build, then use the following:
|
||||
To build NvimServer, do the following
|
||||
|
||||
```bash
|
||||
clean=true ./bin/build_vimr_dev.sh
|
||||
build_libnvim=true clean=false ./bin/build_nvimserver_for_local_dev.sh
|
||||
```
|
||||
|
||||
### Changes in NvimServer
|
||||
|
||||
Since SwiftPM does not support a script phase, we have to copy some files manually,
|
||||
e.g. `NvimServer` binary.
|
||||
This can be done with the following:
|
||||
|
||||
```bash
|
||||
build_libnvim=true clean=true ./bin/build_nvimserver_for_local_dev.sh
|
||||
```
|
||||
|
||||
See the `build_nvimserver_for_local_dev` script for default values of the env vars.
|
||||
You can set `clean=true` if you want to clean the existing build.
|
||||
You can also use a watch script as follows (it uses `entr`):
|
||||
|
||||
```bash
|
||||
@ -36,6 +16,14 @@ clean_initial_build=true ./bin/watch_nvimserver_and_build
|
||||
When `clean_initial_build` is `true`, the script will clean and build,
|
||||
then continuously invoke the `build_nvimserver_for_local_dev` script.
|
||||
|
||||
## How to build nightly
|
||||
|
||||
```bash
|
||||
git tag -f neovim-nightly; git push -f origin neovim-nightly
|
||||
```
|
||||
|
||||
Then, GitHub actions will build and re-create the release.
|
||||
|
||||
## How to release
|
||||
|
||||
* Set a new version of VimR via
|
||||
|
@ -23,6 +23,13 @@ extension MainWindow {
|
||||
let params = Array(rawParams.suffix(from: 1))
|
||||
|
||||
switch event {
|
||||
|
||||
case .refreshFileBrowser:
|
||||
self.refreshFileBrowser()
|
||||
|
||||
case .revealCurrentBufferInFileBrowser:
|
||||
self.revealCurrentBufferInFileBrowser()
|
||||
|
||||
case .makeSessionTemporary:
|
||||
self.emit(self.uuidAction(for: .makeSessionTemporary))
|
||||
|
||||
|
@ -595,6 +595,14 @@ final class MainWindow: NSObject,
|
||||
Swift.print("fdsfd")
|
||||
}
|
||||
}
|
||||
|
||||
func revealCurrentBufferInFileBrowser() {
|
||||
self.fileBrowser?.scrollToSourceAction(nil)
|
||||
}
|
||||
|
||||
func refreshFileBrowser() {
|
||||
self.fileBrowser?.refreshAction(nil)
|
||||
}
|
||||
}
|
||||
|
||||
// NvimViewDelegate
|
||||
|
@ -17,4 +17,7 @@ enum RpcEvent: String, CaseIterable {
|
||||
case setFont = "com.qvacua.vimr.rpc-events.set-font"
|
||||
case setLinespacing = "com.qvacua.vimr.rpc-events.set-linespacing"
|
||||
case setCharacterspacing = "com.qvacua.vimr.rpc-events.set-characterspacing"
|
||||
|
||||
case revealCurrentBufferInFileBrowser = "com.qvacua.vimr.rpc-events.reveal-current-buffer-in-file-browser"
|
||||
case refreshFileBrowser = "com.qvacua.vimr.rpc-events.refresh-file-browser"
|
||||
}
|
||||
|
@ -20,10 +20,23 @@ command! -nargs=0 VimRShowTools call s:VimRToggleTools(1)
|
||||
function! s:VimRToggleToolButtons(value) abort
|
||||
call rpcnotify(0, 'com.qvacua.NvimView', 'toggle-tool-buttons', a:value)
|
||||
endfunction
|
||||
|
||||
command! -nargs=0 VimRHideToolButtons call s:VimRToggleToolButtons(-1)
|
||||
command! -nargs=0 VimRToggleToolButtons call s:VimRToggleToolButtons(0)
|
||||
command! -nargs=0 VimRShowToolButtons call s:VimRToggleToolButtons(1)
|
||||
|
||||
function! s:VimRRevealCurrentBufferInFileBrowser() abort
|
||||
if filereadable(expand('%'))
|
||||
call rpcnotify(0, 'com.qvacua.NvimView', 'reveal-current-buffer-in-file-browser')
|
||||
endif
|
||||
endfunction
|
||||
command! -nargs=0 VimRRevealCurrentBuffer call s:VimRRevealCurrentBufferInFileBrowser()
|
||||
|
||||
function! s:VimRRefreshFileBrowser() abort
|
||||
call rpcnotify(0, 'com.qvacua.NvimView', 'refresh-file-browser')
|
||||
endfunction
|
||||
command! -nargs=0 VimRRefreshFileBrowser call s:VimRRefreshFileBrowser()
|
||||
|
||||
function! s:VimRToggleFullscreen() abort
|
||||
call rpcnotify(0, 'com.qvacua.NvimView', 'toggle-fullscreen')
|
||||
endfunction
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Next
|
||||
|
||||
* ...
|
||||
* Add `VimRRefreshFileBrowser` and `VimRRevealCurrentBufferInFileBrowser` functions. Thanks @jaanauati for the PR!
|
||||
|
||||
# 0.41.2-20220628.220813
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user