Coder Social home page Coder Social logo

muskanmahajan37 / lua-dev.nvim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from folke/neodev.nvim

0.0 0.0 0.0 79 KB

๐Ÿ’ป Dev setup for init.lua and plugin development with full signature help, docs and completion for the nvim lua API.

Lua 100.00%

lua-dev.nvim's Introduction

๐Ÿ’ป lua-dev

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

image

image

โœจ Features

  • EmmyLua library for the nvim lua API for:
    • completion
    • hover docs
    • function signatures
  • properly configures the require path with lua/?.lua and lua/?/init.lua.
  • adds all plugins in opt and start to the workspace so you get completion for all installed plugins
  • properly configure the vim runtime

โšก๏ธ Requirements

๐Ÿ“ฆ Installation

Install the plugin with your preferred package manager:

packer

use "folke/lua-dev.nvim"

vim-plug

Plug 'folke/lua-dev.nvim'

โš™๏ธ Configuration

lua-dev comes with the following defaults:

{
  library = {
    vimruntime = true, -- runtime path
    vimconfig = true, -- typically ~/.config/nvim
    plugins = true, -- installed opt or start plugins in packpath
    types = true, -- full signature, docs and completion of vim.api, vim.treesitter, vim.lsp and others
  },
}

๐Ÿš€ Setup

local luadev = require("lua-dev").setup({
 -- add any options here, or leave empty to use the default settings
})

local lspconfig = require('lspconfig')
lspconfig.sumneko_lua.setup(luadev)

โ“ How?

Neovim includes a script to generated the nvim docs. That script also creates message pack files containing all the API metadata in a structured way. Unfortunately these files are not packaged in the releases.

Using the message pack files, I converted all the API data to EmmyLua annotations and make them available for the Sumneko LSP as a workspace library.

๐Ÿ—’๏ธ Limitations

  • vim.fn functions are currently not part of the EmmyLua library since no message pack files are generated.
  • function return types are always any, since that information is missing

lua-dev.nvim's People

Contributors

folke avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.