fennel-ls/test/init.fnl
Michele Campeotto 9ea6a0965b Add documentSymbol support
Implements LSP documentSymbol request to provide a list of all symbols
defined in the current document. Clients use it to show an outline and
allow to jump to the symbol's definition.
2025-10-22 09:55:55 -05:00

33 lines
940 B
Fennel

(local faith (require :faith))
(local fennel (require :fennel))
(set debug.getinfo (or fennel.getinfo debug.getinfo))
(set debug.traceback (or fennel.traceback debug.traceback))
(case (string.match (or (os.getenv "FAITH_TEST") "")
"([^ ]+) ?([^ ]*)")
(module "") (faith.run [module])
(module function) (do
(tset package.loaded module
{function (. (require module) function)})
(faith.run [module]))
_ (faith.run
[:test.json-rpc
:test.string-processing
:test.capabilities
:test.settings
:test.diagnostic
:test.goto-definition
:test.hover
:test.completion
:test.references
:test.document-highlight
:test.document-symbol
:test.signature-help
:test.lint
:test.code-action
:test.rename
:test.misc
:test.cli
:test.meta]))