feat: add .luarc.json (#24592)

This commit is contained in:
Lewis Russell 2023-08-07 16:27:53 +01:00 committed by GitHub
parent 832459219b
commit c0beb8173f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 32 additions and 38 deletions

1
.gitignore vendored
View File

@ -2,7 +2,6 @@
/.direnv/
/venv/
compile_commands.json
/.luarc.json
/.envrc
# IDEs

28
.luarc.json Normal file
View File

@ -0,0 +1,28 @@
{
"$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json",
"runtime": {
"version": "LuaJIT"
},
"workspace": {
"library": [
"runtime/lua",
"${3rd}/busted/library",
"${3rd}/luv/library"
],
"checkThirdParty": false
},
"diagnostics": {
"groupFileStatus": {
"strict": "Opened",
"strong": "Opened"
},
"groupSeverity": {
"strong": "Warning",
"strict": "Warning"
},
"unusedLocalExclude": [ "_*" ],
"disable": [
"luadoc-miss-see-name"
]
}
}

View File

@ -237,12 +237,6 @@ make lint
- Recommendation is to use **[clangd]**.
Can use the maintained config in [nvim-lspconfig/clangd].
- 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:
```bash
ln -s contrib/luarc.json .luarc.json
```
### Includes

View File

@ -1,31 +0,0 @@
{
"runtime.version": "LuaJIT",
"diagnostics": {
"enable": true,
"globals": [
"vim",
"describe",
"pending",
"it",
"before_each",
"after_each",
"setup",
"teardown",
"finally",
"lfs"
],
"disable": [
"luadoc-miss-see-name"
]
},
"workspace": {
"library": [
"runtime/lua",
"${3rd}/lfs/library"
],
"checkThirdParty": false,
"maxPreload": 2000,
"preloadFileSize": 1000
},
"telemetry.enable": false
}

View File

@ -1,5 +1,8 @@
--- @meta
---@type uv
vim.uv = ...
--- The following modules are loaded specially in _init_packages.lua
vim.F = require('vim.F')
@ -15,6 +18,7 @@ vim.loader = require('vim.loader')
vim.lsp = require('vim.lsp')
vim.re = require('vim.re')
vim.secure = require('vim.secure')
vim.treesitter = require('vim.treesitter')
vim.ui = require('vim.ui')
vim.version = require('vim.version')