How can I get LSP to recognize built-in Neovim API?

This page summarizes the projects mentioned and recommended in the original post on /r/neovim

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • neodev.nvim

    💻 Neovim setup for init.lua and plugin development with full signature help, docs and completion for the nvim lua API.

  • I use lua-dev.nvim to set up sumneko-lua and it works

  • vscode-lua

    Release lua-language-server for VSCode

  • -- https://github.com/sumneko/vscode-lua/blob/master/setting/schema.json local M = { Lua = { runtime = { version = jit and 'LuaJIT' or _VERSION, -- When using require, how to find the file based on the input -- name.Setting this config to ?/init.lua means that when you enter -- require 'myfile', ${workspace}/myfile/init.lua will be searched from -- the loaded files. if runtime.pathStrict is false, -- ${workspace}/**/myfile/init.lua will also be searched. If you want to -- load files outside the workspace, you need to set Lua.workspace.library -- first. path = { 'lua/?.lua', 'lua/?/init.lua', }, -- When enabled, runtime.path will only search the first level of -- directories, see the description of runtime.path. pathStrict = true, }, diagnostics = { globals = { 'vim', }, }, workspace = { -- In addition to the current workspace, which directories will -- load files from. The files in these directories will be treated -- as externally provided code libraries, and some features (such -- as renaming fields) will not modify these files. -- library = library library = f.filter(is_package_path, vim.api.nvim_get_runtime_file('', true)) -- Very important: do not include the '/lua' subdirectory in the -- above paths! The runtime.path entry taks care of that. }, } }

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts