mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
Compare commits
20 Commits
v0.5.1
...
release-0.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1e1fd71fea | ||
![]() |
606ace0fbe | ||
![]() |
b69ceaa2e8 | ||
![]() |
3ad07553e2 | ||
![]() |
64ec1f5b02 | ||
![]() |
b60293b76d | ||
![]() |
e86f95eb10 | ||
![]() |
f65c52d235 | ||
![]() |
2e77847896 | ||
![]() |
5ba88321a6 | ||
![]() |
d8ccee30b0 | ||
![]() |
b5276b36d4 | ||
![]() |
3f20d8bb09 | ||
![]() |
9eed756cad | ||
![]() |
5908d88a3e | ||
![]() |
71950115eb | ||
![]() |
d6f03aaafd | ||
![]() |
14ff19bc36 | ||
![]() |
7b822ea72b | ||
![]() |
a3a56cf60c |
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1,7 +1,6 @@
|
||||
*.h linguist-language=C
|
||||
src/nvim/testdir/test42.in diff
|
||||
.github/ export-ignore
|
||||
ci/ export-ignore
|
||||
.travis.yml export-ignore
|
||||
codecov.yml export-ignore
|
||||
.builds/ export-ignore
|
||||
|
49
.github/labeler.yml
vendored
49
.github/labeler.yml
vendored
@@ -1,49 +0,0 @@
|
||||
"lsp":
|
||||
- runtime/lua/vim/lsp.lua
|
||||
- runtime/lua/vim/lsp/*
|
||||
|
||||
"lua":
|
||||
- runtime/lua/**/*
|
||||
- src/nvim/lua
|
||||
|
||||
"tui":
|
||||
- src/nvim/tui/tui.*
|
||||
|
||||
"treesitter":
|
||||
- src/nvim/lua/treesitter.*
|
||||
- runtime/lua/vim/treesitter.lua
|
||||
- runtime/lua/vim/treesitter/*
|
||||
|
||||
"dependencies":
|
||||
- third-party/**/*
|
||||
|
||||
"topic: spell":
|
||||
- src/nvim/spell*
|
||||
|
||||
"topic: :terminal":
|
||||
- src/nvim/terminal.*
|
||||
|
||||
"topic: column":
|
||||
- src/nvim/mark.h
|
||||
- src/nvim/mark.c
|
||||
- src/nvim/sign*
|
||||
|
||||
"topic: folds":
|
||||
- src/nvim/fold*
|
||||
|
||||
"topic: mouse":
|
||||
- src/nvim/mouse*
|
||||
|
||||
"topic: documentation":
|
||||
- runtime/doc/*
|
||||
|
||||
"topic: clipboard":
|
||||
- runtime/autoload/provider/clipboard.vim
|
||||
|
||||
"topic: diff":
|
||||
- src/nvim/diff.*
|
||||
|
||||
"topic: build":
|
||||
- CMakeLists.txt
|
||||
- "**/CMakeLists.txt"
|
||||
- "**/*.cmake"
|
13
.github/workflows/labeler.yml
vendored
13
.github/workflows/labeler.yml
vendored
@@ -1,13 +0,0 @@
|
||||
name: "Pull Request Labeler"
|
||||
on:
|
||||
- pull_request_target
|
||||
jobs:
|
||||
triage:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/labeler@main
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
41
.github/workflows/notes.md
vendored
Normal file
41
.github/workflows/notes.md
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
```
|
||||
${NVIM_VERSION}
|
||||
```
|
||||
|
||||
## Install
|
||||
|
||||
### Windows
|
||||
|
||||
1. Extract **nvim-win64.zip** (or **nvim-win32.zip**)
|
||||
2. Run `nvim-qt.exe`
|
||||
|
||||
### macOS
|
||||
|
||||
1. Download **nvim-macos.tar.gz**
|
||||
2. Extract: `tar xzvf nvim-macos.tar.gz`
|
||||
3. Run `./nvim-osx64/bin/nvim`
|
||||
|
||||
### Linux (x64)
|
||||
|
||||
1. Download **nvim.appimage**
|
||||
2. Run `chmod u+x nvim.appimage && ./nvim.appimage`
|
||||
- If your system does not have FUSE you can [extract the appimage](https://github.com/AppImage/AppImageKit/wiki/FUSE#type-2-appimage):
|
||||
```
|
||||
./nvim.appimage --appimage-extract
|
||||
./squashfs-root/usr/bin/nvim
|
||||
```
|
||||
|
||||
### Other
|
||||
|
||||
- Install by [package manager](https://github.com/neovim/neovim/wiki/Installing-Neovim)
|
||||
|
||||
## SHA256 Checksums
|
||||
|
||||
```
|
||||
${SHA_LINUX_64}
|
||||
${SHA_APP_IMAGE}
|
||||
${SHA_APP_IMAGE_ZSYNC}
|
||||
${SHA_MACOS}
|
||||
${SHA_WIN_64}
|
||||
${SHA_WIN_32}
|
||||
```
|
109
.github/workflows/release.yml
vendored
109
.github/workflows/release.yml
vendored
@@ -145,10 +145,22 @@ jobs:
|
||||
publish:
|
||||
needs: [linux, appimage, macOS, windows]
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
GH_REPO: ${{ github.repository }}
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
# Must perform checkout first, since it deletes the target directory
|
||||
# before running, and would therefore delete the downloaded artifacts
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gettext-base
|
||||
|
||||
- if: github.event_name == 'workflow_dispatch'
|
||||
run: echo "TAG_NAME=${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV
|
||||
- if: github.event_name == 'schedule'
|
||||
@@ -158,16 +170,21 @@ jobs:
|
||||
TAG_NAME=${{ github.ref }}
|
||||
echo "TAG_NAME=${TAG_NAME#refs/tags/}" >> $GITHUB_ENV
|
||||
- if: env.TAG_NAME == 'nightly'
|
||||
run: echo 'SUBJECT=Nvim development (prerelease) build' >> $GITHUB_ENV
|
||||
- if: env.TAG_NAME != 'nightly'
|
||||
run: echo 'SUBJECT=Nvim release build' >> $GITHUB_ENV
|
||||
- if: env.TAG_NAME == 'nightly'
|
||||
uses: dev-drprasad/delete-tag-and-release@v0.1.2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
delete_release: true
|
||||
tag_name: nightly
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
(echo 'SUBJECT=Nvim development (prerelease) build';
|
||||
echo 'PRERELEASE=--prerelease') >> $GITHUB_ENV
|
||||
gh release delete nightly --yes || true
|
||||
git push origin :nightly || true
|
||||
- if: env.TAG_NAME != 'nightly'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
(echo 'SUBJECT=Nvim release build';
|
||||
echo 'PRERELEASE=') >> $GITHUB_ENV
|
||||
gh release delete stable --yes || true
|
||||
git push origin :stable || true
|
||||
# `sha256sum` outputs <sha> <path>, so we cd into each dir to drop the
|
||||
# containing folder from the output.
|
||||
- name: Generate Linux64 SHA256 checksums
|
||||
@@ -200,67 +217,13 @@ jobs:
|
||||
cd ./nvim-win64
|
||||
sha256sum nvim-win64.zip > nvim-win64.zip.sha256sum
|
||||
echo "SHA_WIN_64=$(cat nvim-win64.zip.sha256sum)" >> $GITHUB_ENV
|
||||
- uses: meeDamian/github-release@2.0
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
name: ${{ needs.linux.outputs.release }}
|
||||
prerelease: ${{ env.TAG_NAME == 'nightly' }}
|
||||
commitish: ${{ github.sha }}
|
||||
gzip: false
|
||||
allow_override: ${{ env.TAG_NAME == 'nightly' }}
|
||||
files: |
|
||||
nvim-macos.tar.gz:./nvim-macos/nvim-macos.tar.gz
|
||||
nvim-macos.tar.gz.sha256sum:./nvim-macos/nvim-macos.tar.gz.sha256sum
|
||||
nvim-linux64.tar.gz:./nvim-linux64/nvim-linux64.tar.gz
|
||||
nvim-linux64.tar.gz.sha256sum:./nvim-linux64/nvim-linux64.tar.gz.sha256sum
|
||||
nvim.appimage:./appimage/nvim.appimage
|
||||
nvim.appimage.sha256sum:./appimage/nvim.appimage.sha256sum
|
||||
nvim.appimage.zsync:./appimage/nvim.appimage.zsync
|
||||
nvim.appimage.zsync.sha256sum:./appimage/nvim.appimage.zsync.sha256sum
|
||||
nvim-win32.zip:./nvim-win32/nvim-win32.zip
|
||||
nvim-win32.zip.sha256sum:./nvim-win32/nvim-win32.zip.sha256sum
|
||||
nvim-win64.zip:./nvim-win64/nvim-win64.zip
|
||||
nvim-win64.zip.sha256sum:./nvim-win64/nvim-win64.zip.sha256sum
|
||||
body: |
|
||||
${{ env.SUBJECT }}
|
||||
```
|
||||
${{ needs.linux.outputs.version }}```
|
||||
|
||||
## Install
|
||||
|
||||
### Windows
|
||||
|
||||
1. Extract **nvim-win64.zip** (or **nvim-win32.zip**)
|
||||
2. Run `nvim-qt.exe`
|
||||
|
||||
### macOS
|
||||
|
||||
1. Download **nvim-macos.tar.gz**
|
||||
2. Extract: `tar xzvf nvim-macos.tar.gz`
|
||||
3. Run `./nvim-osx64/bin/nvim`
|
||||
|
||||
### Linux (x64)
|
||||
|
||||
1. Download **nvim.appimage**
|
||||
2. Run `chmod u+x nvim.appimage && ./nvim.appimage`
|
||||
- If your system does not have FUSE you can [extract the appimage](https://github.com/AppImage/AppImageKit/wiki/FUSE#type-2-appimage):
|
||||
```
|
||||
./nvim.appimage --appimage-extract
|
||||
./squashfs-root/usr/bin/nvim
|
||||
```
|
||||
|
||||
### Other
|
||||
|
||||
- Install by [package manager](https://github.com/neovim/neovim/wiki/Installing-Neovim)
|
||||
|
||||
## SHA256 Checksums
|
||||
|
||||
```
|
||||
${{ env.SHA_LINUX_64 }}
|
||||
${{ env.SHA_APP_IMAGE }}
|
||||
${{ env.SHA_APP_IMAGE_ZSYNC }}
|
||||
${{ env.SHA_MACOS }}
|
||||
${{ env.SHA_WIN_64 }}
|
||||
${{ env.SHA_WIN_32 }}
|
||||
```
|
||||
- name: Publish release
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NVIM_VERSION: ${{ needs.linux.outputs.version }}
|
||||
run: |
|
||||
envsubst < "$GITHUB_WORKSPACE/.github/workflows/notes.md" > "$RUNNER_TEMP/notes.md"
|
||||
gh release create $TAG_NAME $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA nvim-macos/* nvim-linux64/* appimage/* nvim-win32/* nvim-win64/*
|
||||
if [ "$TAG_NAME" != "nightly" ]; then
|
||||
gh release create stable $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA nvim-macos/* nvim-linux64/* appimage/* nvim-win32/* nvim-win64/*
|
||||
fi
|
||||
|
@@ -137,8 +137,8 @@ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
|
||||
# version string, else they are combined with the result of `git describe`.
|
||||
set(NVIM_VERSION_MAJOR 0)
|
||||
set(NVIM_VERSION_MINOR 5)
|
||||
set(NVIM_VERSION_PATCH 1)
|
||||
set(NVIM_VERSION_PRERELEASE "") # for package maintainers
|
||||
set(NVIM_VERSION_PATCH 2)
|
||||
set(NVIM_VERSION_PRERELEASE "-dev") # for package maintainers
|
||||
|
||||
# API level
|
||||
set(NVIM_API_LEVEL 7) # Bump this after any API change.
|
||||
|
@@ -170,6 +170,11 @@ if (-not $NoTests) {
|
||||
}
|
||||
}
|
||||
|
||||
# Ensure choco's cpack is not in PATH otherwise, it conflicts with CMake's
|
||||
if (Test-Path -Path $env:ChocolateyInstall\bin\cpack.exe) {
|
||||
Remove-Item -Path $env:ChocolateyInstall\bin\cpack.exe -Force
|
||||
}
|
||||
|
||||
# Build artifacts
|
||||
cpack -G ZIP -C RelWithDebInfo
|
||||
if ($env:APPVEYOR_REPO_TAG_NAME -ne $null) {
|
||||
|
@@ -13,7 +13,7 @@ from the connected program.
|
||||
Terminal buffers behave like normal buffers, except:
|
||||
- With 'modifiable', lines can be edited but not deleted.
|
||||
- 'scrollback' controls how many lines are kept.
|
||||
- Output is followed if the cursor is on the last line.
|
||||
- Output is followed ("tailed") if cursor is on the last line.
|
||||
- 'modified' is the default. You can set 'nomodified' to avoid a warning when
|
||||
closing the terminal buffer.
|
||||
- 'bufhidden' defaults to "hide".
|
||||
|
@@ -33,6 +33,17 @@ do
|
||||
|
||||
vim.fn.mkdir(vim.fn.stdpath('cache'), "p")
|
||||
local logfile = assert(io.open(logfilename, "a+"))
|
||||
|
||||
local log_info = vim.loop.fs_stat(logfilename)
|
||||
if log_info and log_info.size > 1e9 then
|
||||
local warn_msg = string.format(
|
||||
"LSP client log is large (%d MB): %s",
|
||||
log_info.size / (1000 * 1000),
|
||||
logfilename
|
||||
)
|
||||
vim.notify(warn_msg)
|
||||
end
|
||||
|
||||
-- Start message for logging
|
||||
logfile:write(string.format("[START][%s] LSP logging initiated\n", os.date(log_date_format)))
|
||||
for level, levelnr in pairs(log.levels) do
|
||||
|
@@ -5328,14 +5328,19 @@ static void f_jobwait(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
TV_LIST_ITER_CONST(args, arg, {
|
||||
Channel *chan = NULL;
|
||||
if (TV_LIST_ITEM_TV(arg)->v_type != VAR_NUMBER
|
||||
|| !(chan = find_job(TV_LIST_ITEM_TV(arg)->vval.v_number, false))) {
|
||||
|| !(chan = find_channel(TV_LIST_ITEM_TV(arg)->vval.v_number))
|
||||
|| chan->streamtype != kChannelStreamProc) {
|
||||
jobs[i] = NULL; // Invalid job.
|
||||
} else if (process_is_stopped(&chan->stream.proc)) {
|
||||
// Job is stopped but not fully destroyed.
|
||||
// Ensure all callbacks on its event queue are executed. #15402
|
||||
process_wait(&chan->stream.proc, -1, NULL);
|
||||
jobs[i] = NULL; // Invalid job.
|
||||
} else {
|
||||
jobs[i] = chan;
|
||||
channel_incref(chan);
|
||||
if (chan->stream.proc.status < 0) {
|
||||
// Process any pending events on the job's queue before temporarily
|
||||
// replacing it.
|
||||
// Flush any events in the job's queue before temporarily replacing it.
|
||||
multiqueue_process_events(chan->events);
|
||||
multiqueue_replace_parent(chan->events, waiting_jobs);
|
||||
}
|
||||
|
@@ -132,38 +132,35 @@ end
|
||||
describe('LSP', function()
|
||||
before_each(function()
|
||||
clear_notrace()
|
||||
-- Run an instance of nvim on the file which contains our "scripts".
|
||||
-- Pass TEST_NAME to pick the script.
|
||||
local test_name = "basic_init"
|
||||
exec_lua([=[
|
||||
lsp = require('vim.lsp')
|
||||
local test_name, fixture_filename, logfile = ...
|
||||
function test__start_client()
|
||||
return lsp.start_client {
|
||||
cmd_env = {
|
||||
NVIM_LOG_FILE = logfile;
|
||||
};
|
||||
cmd = {
|
||||
vim.v.progpath, '-Es', '-u', 'NONE', '--headless',
|
||||
"-c", string.format("lua TEST_NAME = %q", test_name),
|
||||
"-c", "luafile "..fixture_filename;
|
||||
};
|
||||
root_dir = vim.loop.cwd();
|
||||
}
|
||||
end
|
||||
TEST_CLIENT1 = test__start_client()
|
||||
]=], test_name, fake_lsp_code, fake_lsp_logfile)
|
||||
end)
|
||||
|
||||
after_each(function()
|
||||
exec_lua("lsp._vim_exit_handler()")
|
||||
-- exec_lua("lsp.stop_all_clients(true)")
|
||||
end)
|
||||
|
||||
describe('server_name specified', function()
|
||||
before_each(function()
|
||||
-- Run an instance of nvim on the file which contains our "scripts".
|
||||
-- Pass TEST_NAME to pick the script.
|
||||
local test_name = "basic_init"
|
||||
exec_lua([=[
|
||||
lsp = require('vim.lsp')
|
||||
local test_name, fixture_filename, logfile = ...
|
||||
function test__start_client()
|
||||
return lsp.start_client {
|
||||
cmd_env = {
|
||||
NVIM_LOG_FILE = logfile;
|
||||
};
|
||||
cmd = {
|
||||
vim.v.progpath, '-Es', '-u', 'NONE', '--headless',
|
||||
"-c", string.format("lua TEST_NAME = %q", test_name),
|
||||
"-c", "luafile "..fixture_filename;
|
||||
};
|
||||
root_dir = vim.loop.cwd();
|
||||
}
|
||||
end
|
||||
TEST_CLIENT1 = test__start_client()
|
||||
]=], test_name, fake_lsp_code, fake_lsp_logfile)
|
||||
end)
|
||||
|
||||
after_each(function()
|
||||
exec_lua("lsp._vim_exit_handler()")
|
||||
-- exec_lua("lsp.stop_all_clients(true)")
|
||||
end)
|
||||
|
||||
it('start_client(), stop_client()', function()
|
||||
retry(nil, 4000, function()
|
||||
eq(1, exec_lua('return #lsp.get_active_clients()'))
|
||||
|
@@ -7,6 +7,7 @@ local eq, neq = helpers.eq, helpers.neq
|
||||
local write_file = helpers.write_file
|
||||
local command= helpers.command
|
||||
local exc_exec = helpers.exc_exec
|
||||
local matches = helpers.matches
|
||||
|
||||
describe(':terminal buffer', function()
|
||||
local screen
|
||||
@@ -259,6 +260,14 @@ describe(':terminal buffer', function()
|
||||
eq('Vim(wqall):E948: Job still running', exc_exec('wqall'))
|
||||
end)
|
||||
|
||||
it('stops running jobs with :quit', function()
|
||||
-- Open in a new window to avoid terminating the nvim instance
|
||||
command('split')
|
||||
command('terminal')
|
||||
command('set nohidden')
|
||||
command('quit')
|
||||
end)
|
||||
|
||||
it('does not segfault when pasting empty buffer #13955', function()
|
||||
feed_command('terminal')
|
||||
feed('<c-\\><c-n>')
|
||||
|
Reference in New Issue
Block a user