-
-
Notifications
You must be signed in to change notification settings - Fork 335
File Structure
Thank you for reading this wiki. I will briefly describe the file construction of this language server.
WIP...
submodules
binaries, ignored in git
locale files, if you want to support a language, you only need to name the folder with the language id
default log path, ignored in git
used for build
provide definition files.
subdirectories
definition files for built-in 3rd library, e.g. love2d
, OpenResty
.
definition template files for built-in library, e.g. io
, table
after the language server is started, real definition files will be generated according to your Lua version, language ID and file encoding
definition files for built-in library, ignored in git
code executed by the language server
subdirectories
sub thread workers, provide "read protocol from standard input", "read file content" and "regularly wake up the main thread"
provide --version
and --check
, see https://github.com/sumneko/lua-language-server/wiki/Command-line
provide language features
subdirectories
convert encoding between ansi
, utf8
and utf16
lua-glob
Used to resolve abc/*/[1-9].lua
LuaParser
parsing Lua code into an abstract syntax tree
x = 1
y = 1
{
type = 'main',
start = 0,
finish = 20000,
[1] = {
type = 'setglobal',
start = 0,
finish = 1,
range = 5,
[1] = 'x',
value = {
type = 'integer',
start = 4,
finish = 5,
[1] = 1
},
},
[2] = {
type = 'setglobal',
start = 10000,
finish = 10001,
range = 10005,
[1] = 'y',
value = {
type = 'integer',
start = 10004,
finish = 10005,
[1] = 2
},
},
}
first line is 0,
start
is cursor position on the left andfinish
is cursor position on the right position = row * 10000 + col, therefore, only codes without more than 10000 bytes in a single line are supported
most of the files are obsolete, and only the following files are in use
provide debugger attach
with parameters --develop
entry file for language server
entry file for testing