diff options
author | Gregory Anders <8965202+gpanders@users.noreply.github.com> | 2021-12-01 12:09:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-01 12:09:50 -0700 |
commit | 73b35ef10f95536874bfa147c44f62c4fea08f0f (patch) | |
tree | 6446e222128bbf4cfa77d0c97a6adfcffd5e002f | |
parent | 99f6260f84a8ef94495c831155d98c330078e0ad (diff) | |
download | rneovim-73b35ef10f95536874bfa147c44f62c4fea08f0f.tar.gz rneovim-73b35ef10f95536874bfa147c44f62c4fea08f0f.tar.bz2 rneovim-73b35ef10f95536874bfa147c44f62c4fea08f0f.zip |
chore: add default luarc.json for Lua development (#16487)
The Sumneko Lua language server has matured quite a bit and many
Neovim developers use it while working on Neovim. Having a default
configuration for Neovim development is a nice convenience (and
dovetails well with the auto-generated compile_command.json for C
development).
The file is shipped under `contrib` and users can make use of it by
symlinking to `.luarc.json` in the project root.
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | CONTRIBUTING.md | 5 | ||||
-rw-r--r-- | contrib/luarc.json | 23 |
3 files changed, 29 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore index e07ce4906e..0988a51cd9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Tools /venv/ compile_commands.json +/.luarc.json # IDEs /.vs/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e9c1173007..a3bfa06cfb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -244,6 +244,10 @@ You can lint a single file (but this will _not_ exclude legacy errors): ("Exuberant ctags", the typical `ctags` binary provided by your distro, is unmaintained and won't recognize many function signatures in Neovim source.) - Explore the source code [on the web](https://sourcegraph.com/github.com/neovim/neovim). +- If using [lua-language-server][], symlink `contrib/luarc.json` into the + project root: + + $ ln -s contrib/luarc.json .luarc.json Reviewing @@ -288,3 +292,4 @@ as context, use the `-W` argument as well. [pr-draft]: https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request [pr-ready]: https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request [uncrustify]: https://formulae.brew.sh/formula/uncrustify +[lua-language-server]: https://github.com/sumneko/lua-language-server/ diff --git a/contrib/luarc.json b/contrib/luarc.json new file mode 100644 index 0000000000..770b023ac6 --- /dev/null +++ b/contrib/luarc.json @@ -0,0 +1,23 @@ +{ + "runtime.version": "LuaJIT", + "diagnostics": { + "enable": true, + "globals": [ + "vim", + "describe", + "it", + "before_each", + "after_each", + "setup", + "teardown" + ] + }, + "workspace": { + "library": { + "runtime/lua": true + }, + "maxPreload": 2000, + "preloadFileSize": 1000 + }, + "telemetry.enable": false +} |