Code Monkey home page Code Monkey logo

eglot-luau's Introduction

eglot-luau MELPA

eglot-luau is an Emacs package that adds support for the Luau Lanuage Server to eglot.

Configuration

eglot-luau provides the following customizable variables:

  • eglot-luau-rojo-sourcemap-enabled: boolean

    This variable determines whether eglot-luau will start a Rojo process to generate sourecemaps for the language server. The value of this variable is nil by default.

  • eglot-luau-rojo-sourcemap-includes-non-scripts: boolean

    This variable determines whether non-script instances are present in the Rojo sourcemap. The value of this variable is nil by default.

  • eglot-luau-auto-update-roblox-types: boolean

    This variable determines whether eglot-luau-setup will attempt to download the latest Roblox type definitions. The value of this variable is nil by default.

  • eglot-luau-auto-update-roblox-docs: boolean

    This variable determines whether eglot-luau-setup will attempt to download the latest Roblox docs. The value of this variable is nil by default.

  • eglot-luau-roblox-security-level: string

    This variable determines the security level of type definitions downloaded when eglot-luau-lsp-auto-update-roblox-types is non-nil. The available options are None, LocalUserSecurity, PluginSecurity, and RobloxScriptSecurity. The value of this variable is PluginSecurity by default.

  • eglot-luau-rojo-project-path: string

    This variable determines the path passed to Rojo for sourcemap generation. The value of this variable is default.project.json by default.

  • eglot-luau-fflags-enabled: boolean

    This variable determines whether the language server will have any FFlags enabled. The value of this variable is t by default.

  • eglot-luau-fflag-overrides: alist

    This variable allows overriding FFlags. It is an alist mapping the names of FFlags to their desired values. An example value is ``(("LuauNonStrictByDefaultBetaFeature" "False"))`. The value of this variable is the empty list by default.

  • eglot-luau-sync-fflags: boolean

    This variable determines whether eglot-luau-setup will attempt to download the latest Roblox FFlag configuration. The value of this variable is t by default.

  • eglot-luau-custom-type-files: list

    This variable is a list of paths to custom type definition files to supply to the language server. The value of this variable is the empty list by default.

  • eglot-luau-custom-doc-files: list

    This variable is a list of paths to custom doc files to supply to the language server. The value of this variable is the empty list by default.

  • eglot-luau-server-executable: string

    This variable determines how to locate the language server. The value of this variable is luau-lsp by default (i.e. it assumes luau-lsp is on the PATH environment variable).

eglot-luau is also configurable using LSP's "workspace configuration," as described in the Eglot documentation.

The entry point to the package is the function eglot-luau-setup. This function should be called after eglot is loaded.

Below is a example configuration using use-package:

(use-package eglot-luau
  :demand t
  :after (lua-mode eglot)
  :functions eglot-luau-setup
  :config (eglot-luau-setup)
  :custom
  (eglot-luau-rojo-sourcemap-enabled t)
  (eglot-luau-rojo-sourcemap-includes-non-scripts t)
  (eglot-luau-auto-update-roblox-docs t)
  (eglot-luau-auto-update-roblox-types t)
  (eglot-luau-fflag-overrides '(("LuauNonStrictByDefaultBetaFeature" "False")))
  :hook (lua-mode . eglot-ensure))

Known issues

end completion does not work. This seems to be caused by a deeper issue in eglot that causes \n to be unusable as a trigger character. Since luau-lsp is hardcoded to use \n as a trigger character for end completion, this is not very straightforward to fix.

Additionally, eglot-luau does not support bytecode generation, not does it support luau-lsp's Roblox Studio companion plugin.

eglot-luau's People

Contributors

kennethloeffler avatar

Stargazers

Lewin Kelly avatar Elijah Gabe avatar  avatar

Watchers

 avatar

Forkers

emacsmirror

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.