mcfunction-lsp

command module
v0.0.0-...-3bc37bc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 5 Imported by: 0

README ¶

MCFunction LSP

Minecraft Function LSP for better development experience

💻 Demonstration

[!NOTE] This project is still in-development. This section will appear later.

🧩 Installation

If your editor isn't listed here, refer to the editor's documentation regarding installation of custom LSP servers.

Neovim

You will need to define mcfunction filetype:

vim.filetype.add {
  extension = {
    mcfunction = 'mcfunction',
  },
}

Then register the LSP:

local client = vim.lsp.start_client {
  name = 'mcfunction_lsp',
  cmd = { '/path/to/mcfunction-lsp' },
  root_dir = vim.fn.getcwd(),
}

if not client then
  vim.notify 'MCFunction LSP Client did not load!'
end

-- Attach the LSP client when opening an .mcfunction file
vim.api.nvim_create_autocmd('FileType', {
  pattern = 'mcfunction',
  callback = function()
    vim.lsp.buf_attach_client(0, client)
  end,
})

VSCode / VSCodium

Install the VSCode Extension.

📦 Building

  1. Clone the repository: git clone https://github.com/mend-lang/mcfunction-lsp.git.
  2. Compile the project: 2.1. Use make dev to compile a debug build. 2.2. Use make prod to compile to every platform (Windows, MacOS, Linux)
  3. Provide the path to binary in your editor's LSP config.

Documentation ¶

The Go Gopher

There is no documentation for this package.

Directories ¶

Path Synopsis
lsp

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL