From c0beb8173fe2f8a8f71cd5a3a6cdfed145a1d973 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Mon, 7 Aug 2023 16:27:53 +0100 Subject: [PATCH] feat: add .luarc.json (#24592) --- .gitignore | 1 - .luarc.json | 28 ++++++++++++++++++++++++++++ CONTRIBUTING.md | 6 ------ contrib/luarc.json | 31 ------------------------------- runtime/lua/vim/_meta.lua | 4 ++++ 5 files changed, 32 insertions(+), 38 deletions(-) create mode 100644 .luarc.json delete mode 100644 contrib/luarc.json diff --git a/.gitignore b/.gitignore index d04b91dbb7..f1661e1f00 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ /.direnv/ /venv/ compile_commands.json -/.luarc.json /.envrc # IDEs diff --git a/.luarc.json b/.luarc.json new file mode 100644 index 0000000000..12696131aa --- /dev/null +++ b/.luarc.json @@ -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" + ] + } +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 18603321fb..bed2867a56 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 diff --git a/contrib/luarc.json b/contrib/luarc.json deleted file mode 100644 index 31126e4215..0000000000 --- a/contrib/luarc.json +++ /dev/null @@ -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 -} diff --git a/runtime/lua/vim/_meta.lua b/runtime/lua/vim/_meta.lua index 839830294e..5e4f390ca3 100644 --- a/runtime/lua/vim/_meta.lua +++ b/runtime/lua/vim/_meta.lua @@ -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')