Skip to content

A LanguageServer implementation in GO for the scripting language daedalus

License

Notifications You must be signed in to change notification settings

kirides/DaedalusLanguageServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

324c255 · Apr 11, 2025
Apr 11, 2025
Nov 1, 2022
Apr 11, 2025
Apr 11, 2025
Apr 11, 2025
Jul 23, 2022
Jan 2, 2024
Oct 30, 2022
Oct 19, 2022
Dec 29, 2020
Oct 11, 2023
Oct 19, 2022
Oct 19, 2022
Oct 19, 2022
Feb 17, 2023
Nov 1, 2022
Nov 1, 2022
Apr 11, 2025
Apr 11, 2025
Jul 23, 2022
Jul 23, 2022
Jun 11, 2023
Oct 19, 2022

Repository files navigation

Build

Usage

see: https://github.com/kirides/vscode-daedalus

Custom externals

The server looks for a _externals\ directory located in the workspace root.
When there is a _externals\externals.src it will try to parse it and all referenced files right after parsing the built-in externals and before parsing user scripts.

  • If there is no _externals\externals.src we look for a _externals\externals.d and try to parse that.

This externals should be provided from Union plugins such as zParserExtender.

Aknowledgements

Gothic Classic - Nintendo Switch

g1_nx_credits_h264.mp4

neovim configuration

Minimum configuration needed to run the language server

somewhere in init.lua or any lua script

vim.api.nvim_create_autocmd("FileType", {
    pattern = "d",
    callback = function(ev)
        local root_dir = vim.fs.dirname(
            vim.fs.find({ 'Gothic.src', 'Camera.src', 'Menu.src', 'Music.src', 'ParticleFX.src', 'SFX.src', 'VisualFX.src' }, { upward = true })[1]
        )

        local client = vim.lsp.start({
          name = 'DLS',
          cmd = {'C:/.../DaedalusLanguageServer.exe'},
          root_dir = root_dir,
          -- configure language server specific options
          settings = {
            daedalusLanguageServer = {
              loglevel = 'debug',
              inlayHints = { constants = true },
              numParserThreads = 16,
              fileEncoding = 'Windows-1252',
              srcFileEncoding ='Windows-1252',
            },
          },
        })

        vim.lsp.buf_attach_client(0, client)
    end
})


vim.cmd([[highlight! link LspSignatureActiveParameter Search]])