0.0.1 • Published 3 months ago

@binhtran432k/langiumls v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

Langium Language Server

This project provides a Language Server Protocol (LSP) implementation for the Langium language, enabling integration with various code editors beyond just Visual Studio Code.

Motivation

The official Langium library currently lacks a language server for editors outside VSCode. This project aims to fill this gap by offering an LSP server based on the Langium library, published on NPM for broader use.

Neovim Tutorial

Here's how to configure Neovim to utilize the Langium Language Server:

  1. Add langiumls config to lspconfig
local lspconfig = require("lspconfig")
require("lspconfig.configs").langiumls = {
  default_config = {
    -- Replace with the actual path to the Langium Language Server executable
    cmd = { "langiumls", "--stdio" },
    filetypes = { "langium" },
    single_file_support = true,
    root_dir = lspconfig.util.root_pattern("tsconfig.json", "package.json", "jsconfig.json", ".git"),
    settings = {
      langium = {
        build = {
          ignorePatterns = "node_modules, out",
        },
      },
    },
  },
}
  1. Setup Neovim for langiumls
require("lspconfig").langiumls.setup({})
0.0.1

3 months ago