diff --git a/README.md b/README.md index ac50510..33e7390 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ -# Tea Leaves +# Teal Language Server A language server for the [Teal language](https://github.com/teal-language/tl) -[![test](https://github.com/svermeulen/tea-leaves/actions/workflows/test.yml/badge.svg)](https://github.com/svermeulen/tea-leaves/actions/workflows/test.yml) +[![test](https://github.com/teal-language/teal-language-server/actions/workflows/test.yml/badge.svg)](https://github.com/teal-language/teal-language-server/actions/workflows/test.yml) # Installation ### From luarocks -* `luarocks install tea-leaves` -* `tea-leaves` +* `luarocks install teal-language-server` +* `teal-language-server` Tested on Windows, Linux and MacOS @@ -19,7 +19,7 @@ Tested on Windows, Linux and MacOS * Clone repo * From repo root: * `scripts/setup_local_luarocks` - * `./lua_modules/bin/tea-leaves` + * `./lua_modules/bin/teal-language-server` # Features @@ -37,18 +37,18 @@ Install the [lspconfig plugin](https://github.com/neovim/nvim-lspconfig) and put ```lua local lspconfig = require("lspconfig") -lspconfig.tea_leaves.setup {} +lspconfig.teal_language_server.setup {} ``` # Usage ``` -tea-leaves [--verbose=true] [--log-mode=none|by_proj_path|by_date] +teal-language-server [--verbose=true] [--log-mode=none|by_proj_path|by_date] ``` Note: * All args are optional * By default, logging is 'none' which disables logging completely -* When logging is set to by_proj_path or by_date, the log is output to `[User Home Directory]/.cache/tea-leaves` +* When logging is set to by_proj_path or by_date, the log is output to `[User Home Directory]/.cache/teal-language-server` diff --git a/bin/tea-leaves b/bin/tea-leaves index 2491801..8955142 100644 --- a/bin/tea-leaves +++ b/bin/tea-leaves @@ -1,2 +1,2 @@ #!/usr/bin/env lua -require('tea_leaves.main') +require('teal_language_server.main') diff --git a/gen/tea_leaves/args_parser.lua b/gen/teal_language_server/args_parser.lua similarity index 87% rename from gen/tea_leaves/args_parser.lua rename to gen/teal_language_server/args_parser.lua index 2d4c6c1..3c4ef44 100644 --- a/gen/tea_leaves/args_parser.lua +++ b/gen/teal_language_server/args_parser.lua @@ -1,5 +1,5 @@ -local asserts = require("tea_leaves.asserts") +local asserts = require("teal_language_server.asserts") local args_parser = {CommandLineArgs = {}, } @@ -16,7 +16,7 @@ local args_parser = {CommandLineArgs = {}, } function args_parser.parse_args() local argparse = require("argparse") - local parser = argparse("tea-leaves", "Tea Leaves") + local parser = argparse("teal-language-server", "Tea Leaves") parser:option("-V --verbose", "") diff --git a/gen/tea_leaves/asserts.lua b/gen/teal_language_server/asserts.lua similarity index 100% rename from gen/tea_leaves/asserts.lua rename to gen/teal_language_server/asserts.lua diff --git a/gen/tea_leaves/class.lua b/gen/teal_language_server/class.lua similarity index 98% rename from gen/tea_leaves/class.lua rename to gen/teal_language_server/class.lua index 9ef1b43..ee113c9 100644 --- a/gen/tea_leaves/class.lua +++ b/gen/teal_language_server/class.lua @@ -1,5 +1,5 @@ -local asserts = require("tea_leaves.asserts") +local asserts = require("teal_language_server.asserts") local Class = {} diff --git a/gen/tea_leaves/constants.lua b/gen/teal_language_server/constants.lua similarity index 100% rename from gen/tea_leaves/constants.lua rename to gen/teal_language_server/constants.lua diff --git a/gen/tea_leaves/document.lua b/gen/teal_language_server/document.lua similarity index 96% rename from gen/tea_leaves/document.lua rename to gen/teal_language_server/document.lua index adb255e..3910e52 100644 --- a/gen/tea_leaves/document.lua +++ b/gen/teal_language_server/document.lua @@ -1,13 +1,13 @@ local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = pcall(require, 'compat53.module'); if p then _tl_compat = m end end; local assert = _tl_compat and _tl_compat.assert or assert; local ipairs = _tl_compat and _tl_compat.ipairs or ipairs; local math = _tl_compat and _tl_compat.math or math; local pairs = _tl_compat and _tl_compat.pairs or pairs; local string = _tl_compat and _tl_compat.string or string; local table = _tl_compat and _tl_compat.table or table; local _module_name = "document" -local ServerState = require("tea_leaves.server_state") -local Uri = require("tea_leaves.uri") -local lsp = require("tea_leaves.lsp") -local LspReaderWriter = require("tea_leaves.lsp_reader_writer") -local class = require("tea_leaves.class") -local asserts = require("tea_leaves.asserts") -local tracing = require("tea_leaves.tracing") -local util = require("tea_leaves.util") +local ServerState = require("teal_language_server.server_state") +local Uri = require("teal_language_server.uri") +local lsp = require("teal_language_server.lsp") +local LspReaderWriter = require("teal_language_server.lsp_reader_writer") +local class = require("teal_language_server.class") +local asserts = require("teal_language_server.asserts") +local tracing = require("teal_language_server.tracing") +local util = require("teal_language_server.util") local tl = require("tl") diff --git a/gen/tea_leaves/document_manager.lua b/gen/teal_language_server/document_manager.lua similarity index 72% rename from gen/tea_leaves/document_manager.lua rename to gen/teal_language_server/document_manager.lua index da878b5..8db20c0 100644 --- a/gen/tea_leaves/document_manager.lua +++ b/gen/teal_language_server/document_manager.lua @@ -1,12 +1,12 @@ local _module_name = "document_manager" -local ServerState = require("tea_leaves.server_state") -local LspReaderWriter = require("tea_leaves.lsp_reader_writer") -local Uri = require("tea_leaves.uri") -local Document = require("tea_leaves.document") -local asserts = require("tea_leaves.asserts") -local class = require("tea_leaves.class") +local ServerState = require("teal_language_server.server_state") +local LspReaderWriter = require("teal_language_server.lsp_reader_writer") +local Uri = require("teal_language_server.uri") +local Document = require("teal_language_server.document") +local asserts = require("teal_language_server.asserts") +local class = require("teal_language_server.class") local DocumentManager = {} diff --git a/gen/tea_leaves/env_updater.lua b/gen/teal_language_server/env_updater.lua similarity index 91% rename from gen/tea_leaves/env_updater.lua rename to gen/teal_language_server/env_updater.lua index 6f69a05..720cddc 100644 --- a/gen/tea_leaves/env_updater.lua +++ b/gen/teal_language_server/env_updater.lua @@ -1,15 +1,15 @@ local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = pcall(require, 'compat53.module'); if p then _tl_compat = m end end; local package = _tl_compat and _tl_compat.package or package; local pairs = _tl_compat and _tl_compat.pairs or pairs; local string = _tl_compat and _tl_compat.string or string; local _module_name = "env_updater" -local DocumentManager = require("tea_leaves.document_manager") +local DocumentManager = require("teal_language_server.document_manager") local lusc = require("lusc") -local ServerState = require("tea_leaves.server_state") +local ServerState = require("teal_language_server.server_state") local tl = require("tl") -local TealProjectConfig = require("tea_leaves.teal_project_config") +local TealProjectConfig = require("teal_language_server.teal_project_config") local uv = require("luv") -local asserts = require("tea_leaves.asserts") -local tracing = require("tea_leaves.tracing") -local class = require("tea_leaves.class") +local asserts = require("teal_language_server.asserts") +local tracing = require("teal_language_server.tracing") +local class = require("teal_language_server.class") local init_path = package.path local init_cpath = package.cpath diff --git a/gen/tea_leaves/lsp.lua b/gen/teal_language_server/lsp.lua similarity index 100% rename from gen/tea_leaves/lsp.lua rename to gen/teal_language_server/lsp.lua diff --git a/gen/tea_leaves/lsp_events_manager.lua b/gen/teal_language_server/lsp_events_manager.lua similarity index 89% rename from gen/tea_leaves/lsp_events_manager.lua rename to gen/teal_language_server/lsp_events_manager.lua index 7cf9cf3..e1d200e 100644 --- a/gen/tea_leaves/lsp_events_manager.lua +++ b/gen/teal_language_server/lsp_events_manager.lua @@ -1,11 +1,11 @@ local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = pcall(require, 'compat53.module'); if p then _tl_compat = m end end; local debug = _tl_compat and _tl_compat.debug or debug; local xpcall = _tl_compat and _tl_compat.xpcall or xpcall; local _module_name = "lsp_events_manager" -local lsp = require("tea_leaves.lsp") -local LspReaderWriter = require("tea_leaves.lsp_reader_writer") +local lsp = require("teal_language_server.lsp") +local LspReaderWriter = require("teal_language_server.lsp_reader_writer") local lusc = require("lusc") -local asserts = require("tea_leaves.asserts") -local tracing = require("tea_leaves.tracing") -local class = require("tea_leaves.class") +local asserts = require("teal_language_server.asserts") +local tracing = require("teal_language_server.tracing") +local class = require("teal_language_server.class") local LspEventsManager = {} diff --git a/gen/tea_leaves/lsp_reader_writer.lua b/gen/teal_language_server/lsp_reader_writer.lua similarity index 93% rename from gen/tea_leaves/lsp_reader_writer.lua rename to gen/teal_language_server/lsp_reader_writer.lua index d85ba02..821265f 100644 --- a/gen/tea_leaves/lsp_reader_writer.lua +++ b/gen/teal_language_server/lsp_reader_writer.lua @@ -1,12 +1,12 @@ local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = pcall(require, 'compat53.module'); if p then _tl_compat = m end end; local assert = _tl_compat and _tl_compat.assert or assert; local ipairs = _tl_compat and _tl_compat.ipairs or ipairs; local string = _tl_compat and _tl_compat.string or string; local table = _tl_compat and _tl_compat.table or table; local _module_name = "lsp_reader_writer" -local StdinReader = require("tea_leaves.stdin_reader") -local lsp = require("tea_leaves.lsp") +local StdinReader = require("teal_language_server.stdin_reader") +local lsp = require("teal_language_server.lsp") local json = require("dkjson") local uv = require("luv") -local asserts = require("tea_leaves.asserts") -local tracing = require("tea_leaves.tracing") -local class = require("tea_leaves.class") +local asserts = require("teal_language_server.asserts") +local tracing = require("teal_language_server.tracing") +local class = require("teal_language_server.class") local LspReaderWriter = {} diff --git a/gen/tea_leaves/main.lua b/gen/teal_language_server/main.lua similarity index 82% rename from gen/tea_leaves/main.lua rename to gen/teal_language_server/main.lua index 0044bf5..51e83a5 100644 --- a/gen/tea_leaves/main.lua +++ b/gen/teal_language_server/main.lua @@ -1,20 +1,20 @@ local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = pcall(require, 'compat53.module'); if p then _tl_compat = m end end; local ipairs = _tl_compat and _tl_compat.ipairs or ipairs; local table = _tl_compat and _tl_compat.table or table; local _module_name = "main" -local EnvUpdater = require("tea_leaves.env_updater") -local DocumentManager = require("tea_leaves.document_manager") -local ServerState = require("tea_leaves.server_state") -local LspEventsManager = require("tea_leaves.lsp_events_manager") +local EnvUpdater = require("teal_language_server.env_updater") +local DocumentManager = require("teal_language_server.document_manager") +local ServerState = require("teal_language_server.server_state") +local LspEventsManager = require("teal_language_server.lsp_events_manager") local lusc = require("lusc") local uv = require("luv") -local TraceStream = require("tea_leaves.trace_stream") -local args_parser = require("tea_leaves.args_parser") -local MiscHandlers = require("tea_leaves.misc_handlers") -local StdinReader = require("tea_leaves.stdin_reader") -local LspReaderWriter = require("tea_leaves.lsp_reader_writer") -local tracing = require("tea_leaves.tracing") -local util = require("tea_leaves.util") -local TraceEntry = require("tea_leaves.trace_entry") +local TraceStream = require("teal_language_server.trace_stream") +local args_parser = require("teal_language_server.args_parser") +local MiscHandlers = require("teal_language_server.misc_handlers") +local StdinReader = require("teal_language_server.stdin_reader") +local LspReaderWriter = require("teal_language_server.lsp_reader_writer") +local tracing = require("teal_language_server.tracing") +local util = require("teal_language_server.util") +local TraceEntry = require("teal_language_server.trace_entry") @@ -65,7 +65,7 @@ local function main() cached_entries = nil - tracing.info(_module_name, "Started new instance tea-leaves. Lua Version: {version}. Platform: {platform}", { _VERSION, util.get_platform() }) + tracing.info(_module_name, "Started new instance teal-language-server. Lua Version: {version}. Platform: {platform}", { _VERSION, util.get_platform() }) tracing.info(_module_name, "Received command line args: {}", { args }) tracing.info(_module_name, "CWD = {cwd}", { uv.cwd() }) diff --git a/gen/tea_leaves/misc_handlers.lua b/gen/teal_language_server/misc_handlers.lua similarity index 92% rename from gen/tea_leaves/misc_handlers.lua rename to gen/teal_language_server/misc_handlers.lua index c44e62d..91ed28b 100644 --- a/gen/tea_leaves/misc_handlers.lua +++ b/gen/teal_language_server/misc_handlers.lua @@ -1,20 +1,20 @@ local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = pcall(require, 'compat53.module'); if p then _tl_compat = m end end; local math = _tl_compat and _tl_compat.math or math; local pairs = _tl_compat and _tl_compat.pairs or pairs; local string = _tl_compat and _tl_compat.string or string; local table = _tl_compat and _tl_compat.table or table; local _module_name = "misc_handlers" -local EnvUpdater = require("tea_leaves.env_updater") -local args_parser = require("tea_leaves.args_parser") -local TraceStream = require("tea_leaves.trace_stream") -local DocumentManager = require("tea_leaves.document_manager") -local ServerState = require("tea_leaves.server_state") -local LspReaderWriter = require("tea_leaves.lsp_reader_writer") -local Path = require("tea_leaves.path") -local Uri = require("tea_leaves.uri") -local lsp = require("tea_leaves.lsp") -local LspEventsManager = require("tea_leaves.lsp_events_manager") +local EnvUpdater = require("teal_language_server.env_updater") +local args_parser = require("teal_language_server.args_parser") +local TraceStream = require("teal_language_server.trace_stream") +local DocumentManager = require("teal_language_server.document_manager") +local ServerState = require("teal_language_server.server_state") +local LspReaderWriter = require("teal_language_server.lsp_reader_writer") +local Path = require("teal_language_server.path") +local Uri = require("teal_language_server.uri") +local lsp = require("teal_language_server.lsp") +local LspEventsManager = require("teal_language_server.lsp_events_manager") local uv = require("luv") -local asserts = require("tea_leaves.asserts") -local tracing = require("tea_leaves.tracing") -local class = require("tea_leaves.class") +local asserts = require("teal_language_server.asserts") +local tracing = require("teal_language_server.tracing") +local class = require("teal_language_server.class") local MiscHandlers = {} diff --git a/gen/tea_leaves/path.lua b/gen/teal_language_server/path.lua similarity index 97% rename from gen/tea_leaves/path.lua rename to gen/teal_language_server/path.lua index 36e2e0f..d486b42 100644 --- a/gen/tea_leaves/path.lua +++ b/gen/teal_language_server/path.lua @@ -1,9 +1,9 @@ local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = pcall(require, 'compat53.module'); if p then _tl_compat = m end end; local assert = _tl_compat and _tl_compat.assert or assert; local ipairs = _tl_compat and _tl_compat.ipairs or ipairs; local pcall = _tl_compat and _tl_compat.pcall or pcall; local string = _tl_compat and _tl_compat.string or string; local table = _tl_compat and _tl_compat.table or table; local _module_name = "path" -local asserts = require("tea_leaves.asserts") -local class = require("tea_leaves.class") -local util = require("tea_leaves.util") -local tracing = require("tea_leaves.tracing") +local asserts = require("teal_language_server.asserts") +local class = require("teal_language_server.class") +local util = require("teal_language_server.util") +local tracing = require("teal_language_server.tracing") local uv = require("luv") local default_dir_permissions = tonumber('755', 8) diff --git a/gen/tea_leaves/server_state.lua b/gen/teal_language_server/server_state.lua similarity index 94% rename from gen/tea_leaves/server_state.lua rename to gen/teal_language_server/server_state.lua index 6370d28..aceebd3 100644 --- a/gen/tea_leaves/server_state.lua +++ b/gen/teal_language_server/server_state.lua @@ -1,14 +1,14 @@ local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = pcall(require, 'compat53.module'); if p then _tl_compat = m end end; local ipairs = _tl_compat and _tl_compat.ipairs or ipairs; local pairs = _tl_compat and _tl_compat.pairs or pairs; local pcall = _tl_compat and _tl_compat.pcall or pcall; local string = _tl_compat and _tl_compat.string or string; local table = _tl_compat and _tl_compat.table or table; local _module_name = "server_state" -local asserts = require("tea_leaves.asserts") -local lsp = require("tea_leaves.lsp") -local Path = require("tea_leaves.path") +local asserts = require("teal_language_server.asserts") +local lsp = require("teal_language_server.lsp") +local Path = require("teal_language_server.path") local lfs = require("lfs") -local TealProjectConfig = require("tea_leaves.teal_project_config") +local TealProjectConfig = require("teal_language_server.teal_project_config") local tl = require("tl") -local tracing = require("tea_leaves.tracing") -local class = require("tea_leaves.class") +local tracing = require("teal_language_server.tracing") +local class = require("teal_language_server.class") local ServerState = {} @@ -239,7 +239,7 @@ class.setup(ServerState, "ServerState", { return capabilities end, name = function() - return "tea-leaves" + return "teal-language-server" end, version = function() return "0.0.1" diff --git a/gen/tea_leaves/stdin_reader.lua b/gen/teal_language_server/stdin_reader.lua similarity index 94% rename from gen/tea_leaves/stdin_reader.lua rename to gen/teal_language_server/stdin_reader.lua index 4ff38ae..46f5368 100644 --- a/gen/tea_leaves/stdin_reader.lua +++ b/gen/teal_language_server/stdin_reader.lua @@ -2,10 +2,10 @@ local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 th local lusc = require("lusc") -local asserts = require("tea_leaves.asserts") +local asserts = require("teal_language_server.asserts") local uv = require("luv") -local tracing = require("tea_leaves.tracing") -local class = require("tea_leaves.class") +local tracing = require("teal_language_server.tracing") +local class = require("teal_language_server.class") local StdinReader = {} diff --git a/gen/tea_leaves/teal_project_config.lua b/gen/teal_language_server/teal_project_config.lua similarity index 100% rename from gen/tea_leaves/teal_project_config.lua rename to gen/teal_language_server/teal_project_config.lua diff --git a/gen/tea_leaves/trace_entry.lua b/gen/teal_language_server/trace_entry.lua similarity index 100% rename from gen/tea_leaves/trace_entry.lua rename to gen/teal_language_server/trace_entry.lua diff --git a/gen/tea_leaves/trace_stream.lua b/gen/teal_language_server/trace_stream.lua similarity index 93% rename from gen/tea_leaves/trace_stream.lua rename to gen/teal_language_server/trace_stream.lua index 78c7079..6c8497c 100644 --- a/gen/tea_leaves/trace_stream.lua +++ b/gen/teal_language_server/trace_stream.lua @@ -1,11 +1,11 @@ local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = pcall(require, 'compat53.module'); if p then _tl_compat = m end end; local assert = _tl_compat and _tl_compat.assert or assert; local io = _tl_compat and _tl_compat.io or io; local ipairs = _tl_compat and _tl_compat.ipairs or ipairs; local os = _tl_compat and _tl_compat.os or os; local pairs = _tl_compat and _tl_compat.pairs or pairs; local string = _tl_compat and _tl_compat.string or string -local util = require("tea_leaves.util") -local asserts = require("tea_leaves.asserts") -local Path = require("tea_leaves.path") -local TraceEntry = require("tea_leaves.trace_entry") +local util = require("teal_language_server.util") +local asserts = require("teal_language_server.asserts") +local Path = require("teal_language_server.path") +local TraceEntry = require("teal_language_server.trace_entry") local json = require("dkjson") local uv = require("luv") -local class = require("tea_leaves.class") +local class = require("teal_language_server.class") local inspect = require("inspect") local TraceStream = {} @@ -67,7 +67,7 @@ end function TraceStream:_get_log_dir() local homedir = Path(assert(uv.os_homedir())) asserts.that(homedir:exists()) - local log_dir = homedir:join(".cache"):join("tea-leaves") + local log_dir = homedir:join(".cache"):join("teal-language-server") if not log_dir:is_directory() then log_dir:create_directory() diff --git a/gen/tea_leaves/tracing.lua b/gen/teal_language_server/tracing.lua similarity index 97% rename from gen/tea_leaves/tracing.lua rename to gen/teal_language_server/tracing.lua index 46f6ea7..f1fe3a7 100644 --- a/gen/tea_leaves/tracing.lua +++ b/gen/teal_language_server/tracing.lua @@ -1,6 +1,6 @@ local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = pcall(require, 'compat53.module'); if p then _tl_compat = m end end; local ipairs = _tl_compat and _tl_compat.ipairs or ipairs; local os = _tl_compat and _tl_compat.os or os; local pairs = _tl_compat and _tl_compat.pairs or pairs; local string = _tl_compat and _tl_compat.string or string; local table = _tl_compat and _tl_compat.table or table -local TraceEntry = require("tea_leaves.trace_entry") -local asserts = require("tea_leaves.asserts") +local TraceEntry = require("teal_language_server.trace_entry") +local asserts = require("teal_language_server.asserts") local uv = require("luv") local tracing = {} diff --git a/gen/tea_leaves/uri.lua b/gen/teal_language_server/uri.lua similarity index 95% rename from gen/tea_leaves/uri.lua rename to gen/teal_language_server/uri.lua index d6948bb..2a3f729 100644 --- a/gen/tea_leaves/uri.lua +++ b/gen/teal_language_server/uri.lua @@ -1,6 +1,6 @@ local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = pcall(require, 'compat53.module'); if p then _tl_compat = m end end; local pairs = _tl_compat and _tl_compat.pairs or pairs; local string = _tl_compat and _tl_compat.string or string -local asserts = require("tea_leaves.asserts") -local util = require("tea_leaves.util") +local asserts = require("teal_language_server.asserts") +local util = require("teal_language_server.util") diff --git a/gen/tea_leaves/util.lua b/gen/teal_language_server/util.lua similarity index 98% rename from gen/tea_leaves/util.lua rename to gen/teal_language_server/util.lua index 0e0b50d..829384c 100644 --- a/gen/tea_leaves/util.lua +++ b/gen/teal_language_server/util.lua @@ -1,7 +1,7 @@ local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = pcall(require, 'compat53.module'); if p then _tl_compat = m end end; local assert = _tl_compat and _tl_compat.assert or assert; local debug = _tl_compat and _tl_compat.debug or debug; local ipairs = _tl_compat and _tl_compat.ipairs or ipairs; local string = _tl_compat and _tl_compat.string or string; local table = _tl_compat and _tl_compat.table or table; local xpcall = _tl_compat and _tl_compat.xpcall or xpcall; local _module_name = "util" local uv = require("luv") -local tracing = require("tea_leaves.tracing") +local tracing = require("teal_language_server.tracing") local util = {TryOpts = {}, } diff --git a/scripts/generate_lua.bat b/scripts/generate_lua.bat index 931bc44..ab100a1 100644 --- a/scripts/generate_lua.bat +++ b/scripts/generate_lua.bat @@ -4,25 +4,25 @@ call %~dp0setup_local_luarocks.bat cd %~dp0\.. rmdir /s /q gen mkdir gen -mkdir gen\tea_leaves -call luarocks\bin\tl.bat gen %~dp0\..\src\tea_leaves\args_parser.tl -o %~dp0\..\gen\tea_leaves\args_parser.lua -call luarocks\bin\tl.bat gen %~dp0\..\src\tea_leaves\asserts.tl -o %~dp0\..\gen\tea_leaves\asserts.lua -call luarocks\bin\tl.bat gen %~dp0\..\src\tea_leaves\constants.tl -o %~dp0\..\gen\tea_leaves\constants.lua -copy src\tea_leaves\class.lua gen\tea_leaves\class.lua -call luarocks\bin\tl.bat gen %~dp0\..\src\tea_leaves\document.tl -o %~dp0\..\gen\tea_leaves\document.lua -call luarocks\bin\tl.bat gen %~dp0\..\src\tea_leaves\document_manager.tl -o %~dp0\..\gen\tea_leaves\document_manager.lua -call luarocks\bin\tl.bat gen %~dp0\..\src\tea_leaves\env_updater.tl -o %~dp0\..\gen\tea_leaves\env_updater.lua -call luarocks\bin\tl.bat gen %~dp0\..\src\tea_leaves\lsp.tl -o %~dp0\..\gen\tea_leaves\lsp.lua -call luarocks\bin\tl.bat gen %~dp0\..\src\tea_leaves\lsp_events_manager.tl -o %~dp0\..\gen\tea_leaves\lsp_events_manager.lua -call luarocks\bin\tl.bat gen %~dp0\..\src\tea_leaves\lsp_reader_writer.tl -o %~dp0\..\gen\tea_leaves\lsp_reader_writer.lua -call luarocks\bin\tl.bat gen %~dp0\..\src\tea_leaves\main.tl -o %~dp0\..\gen\tea_leaves\main.lua -call luarocks\bin\tl.bat gen %~dp0\..\src\tea_leaves\misc_handlers.tl -o %~dp0\..\gen\tea_leaves\misc_handlers.lua -call luarocks\bin\tl.bat gen %~dp0\..\src\tea_leaves\path.tl -o %~dp0\..\gen\tea_leaves\path.lua -call luarocks\bin\tl.bat gen %~dp0\..\src\tea_leaves\server_state.tl -o %~dp0\..\gen\tea_leaves\server_state.lua -call luarocks\bin\tl.bat gen %~dp0\..\src\tea_leaves\stdin_reader.tl -o %~dp0\..\gen\tea_leaves\stdin_reader.lua -call luarocks\bin\tl.bat gen %~dp0\..\src\tea_leaves\teal_project_config.tl -o %~dp0\..\gen\tea_leaves\teal_project_config.lua -call luarocks\bin\tl.bat gen %~dp0\..\src\tea_leaves\trace_entry.tl -o %~dp0\..\gen\tea_leaves\trace_entry.lua -call luarocks\bin\tl.bat gen %~dp0\..\src\tea_leaves\trace_stream.tl -o %~dp0\..\gen\tea_leaves\trace_stream.lua -call luarocks\bin\tl.bat gen %~dp0\..\src\tea_leaves\tracing.tl -o %~dp0\..\gen\tea_leaves\tracing.lua -call luarocks\bin\tl.bat gen %~dp0\..\src\tea_leaves\uri.tl -o %~dp0\..\gen\tea_leaves\uri.lua -call luarocks\bin\tl.bat gen %~dp0\..\src\tea_leaves\util.tl -o %~dp0\..\gen\tea_leaves\util.lua +mkdir gen\teal_language_server +call luarocks\bin\tl.bat gen %~dp0\..\src\teal_language_server\args_parser.tl -o %~dp0\..\gen\teal_language_server\args_parser.lua +call luarocks\bin\tl.bat gen %~dp0\..\src\teal_language_server\asserts.tl -o %~dp0\..\gen\teal_language_server\asserts.lua +call luarocks\bin\tl.bat gen %~dp0\..\src\teal_language_server\constants.tl -o %~dp0\..\gen\teal_language_server\constants.lua +copy src\teal_language_server\class.lua gen\teal_language_server\class.lua +call luarocks\bin\tl.bat gen %~dp0\..\src\teal_language_server\document.tl -o %~dp0\..\gen\teal_language_server\document.lua +call luarocks\bin\tl.bat gen %~dp0\..\src\teal_language_server\document_manager.tl -o %~dp0\..\gen\teal_language_server\document_manager.lua +call luarocks\bin\tl.bat gen %~dp0\..\src\teal_language_server\env_updater.tl -o %~dp0\..\gen\teal_language_server\env_updater.lua +call luarocks\bin\tl.bat gen %~dp0\..\src\teal_language_server\lsp.tl -o %~dp0\..\gen\teal_language_server\lsp.lua +call luarocks\bin\tl.bat gen %~dp0\..\src\teal_language_server\lsp_events_manager.tl -o %~dp0\..\gen\teal_language_server\lsp_events_manager.lua +call luarocks\bin\tl.bat gen %~dp0\..\src\teal_language_server\lsp_reader_writer.tl -o %~dp0\..\gen\teal_language_server\lsp_reader_writer.lua +call luarocks\bin\tl.bat gen %~dp0\..\src\teal_language_server\main.tl -o %~dp0\..\gen\teal_language_server\main.lua +call luarocks\bin\tl.bat gen %~dp0\..\src\teal_language_server\misc_handlers.tl -o %~dp0\..\gen\teal_language_server\misc_handlers.lua +call luarocks\bin\tl.bat gen %~dp0\..\src\teal_language_server\path.tl -o %~dp0\..\gen\teal_language_server\path.lua +call luarocks\bin\tl.bat gen %~dp0\..\src\teal_language_server\server_state.tl -o %~dp0\..\gen\teal_language_server\server_state.lua +call luarocks\bin\tl.bat gen %~dp0\..\src\teal_language_server\stdin_reader.tl -o %~dp0\..\gen\teal_language_server\stdin_reader.lua +call luarocks\bin\tl.bat gen %~dp0\..\src\teal_language_server\teal_project_config.tl -o %~dp0\..\gen\teal_language_server\teal_project_config.lua +call luarocks\bin\tl.bat gen %~dp0\..\src\teal_language_server\trace_entry.tl -o %~dp0\..\gen\teal_language_server\trace_entry.lua +call luarocks\bin\tl.bat gen %~dp0\..\src\teal_language_server\trace_stream.tl -o %~dp0\..\gen\teal_language_server\trace_stream.lua +call luarocks\bin\tl.bat gen %~dp0\..\src\teal_language_server\tracing.tl -o %~dp0\..\gen\teal_language_server\tracing.lua +call luarocks\bin\tl.bat gen %~dp0\..\src\teal_language_server\uri.tl -o %~dp0\..\gen\teal_language_server\uri.lua +call luarocks\bin\tl.bat gen %~dp0\..\src\teal_language_server\util.tl -o %~dp0\..\gen\teal_language_server\util.lua diff --git a/scripts/generate_lua.sh b/scripts/generate_lua.sh index bb0a2a3..203cc58 100755 --- a/scripts/generate_lua.sh +++ b/scripts/generate_lua.sh @@ -3,25 +3,25 @@ set -ex cd `dirname $BASH_SOURCE`/.. rm -rf ./gen mkdir ./gen -mkdir ./gen/tea_leaves -luarocks_tree/bin/tl gen src/tea_leaves/args_parser.tl -o gen/tea_leaves/args_parser.lua -luarocks_tree/bin/tl gen src/tea_leaves/asserts.tl -o gen/tea_leaves/asserts.lua -cp src/tea_leaves/class.lua gen/tea_leaves/class.lua -luarocks_tree/bin/tl gen src/tea_leaves/constants.tl -o gen/tea_leaves/constants.lua -luarocks_tree/bin/tl gen src/tea_leaves/document.tl -o gen/tea_leaves/document.lua -luarocks_tree/bin/tl gen src/tea_leaves/document_manager.tl -o gen/tea_leaves/document_manager.lua -luarocks_tree/bin/tl gen src/tea_leaves/env_updater.tl -o gen/tea_leaves/env_updater.lua -luarocks_tree/bin/tl gen src/tea_leaves/lsp.tl -o gen/tea_leaves/lsp.lua -luarocks_tree/bin/tl gen src/tea_leaves/lsp_events_manager.tl -o gen/tea_leaves/lsp_events_manager.lua -luarocks_tree/bin/tl gen src/tea_leaves/lsp_reader_writer.tl -o gen/tea_leaves/lsp_reader_writer.lua -luarocks_tree/bin/tl gen src/tea_leaves/main.tl -o gen/tea_leaves/main.lua -luarocks_tree/bin/tl gen src/tea_leaves/misc_handlers.tl -o gen/tea_leaves/misc_handlers.lua -luarocks_tree/bin/tl gen src/tea_leaves/path.tl -o gen/tea_leaves/path.lua -luarocks_tree/bin/tl gen src/tea_leaves/server_state.tl -o gen/tea_leaves/server_state.lua -luarocks_tree/bin/tl gen src/tea_leaves/stdin_reader.tl -o gen/tea_leaves/stdin_reader.lua -luarocks_tree/bin/tl gen src/tea_leaves/teal_project_config.tl -o gen/tea_leaves/teal_project_config.lua -luarocks_tree/bin/tl gen src/tea_leaves/trace_entry.tl -o gen/tea_leaves/trace_entry.lua -luarocks_tree/bin/tl gen src/tea_leaves/trace_stream.tl -o gen/tea_leaves/trace_stream.lua -luarocks_tree/bin/tl gen src/tea_leaves/tracing.tl -o gen/tea_leaves/tracing.lua -luarocks_tree/bin/tl gen src/tea_leaves/uri.tl -o gen/tea_leaves/uri.lua -luarocks_tree/bin/tl gen src/tea_leaves/util.tl -o gen/tea_leaves/util.lua +mkdir ./gen/teal_language_server +luarocks_tree/bin/tl gen src/teal_language_server/args_parser.tl -o gen/teal_language_server/args_parser.lua +luarocks_tree/bin/tl gen src/teal_language_server/asserts.tl -o gen/teal_language_server/asserts.lua +cp src/teal_language_server/class.lua gen/teal_language_server/class.lua +luarocks_tree/bin/tl gen src/teal_language_server/constants.tl -o gen/teal_language_server/constants.lua +luarocks_tree/bin/tl gen src/teal_language_server/document.tl -o gen/teal_language_server/document.lua +luarocks_tree/bin/tl gen src/teal_language_server/document_manager.tl -o gen/teal_language_server/document_manager.lua +luarocks_tree/bin/tl gen src/teal_language_server/env_updater.tl -o gen/teal_language_server/env_updater.lua +luarocks_tree/bin/tl gen src/teal_language_server/lsp.tl -o gen/teal_language_server/lsp.lua +luarocks_tree/bin/tl gen src/teal_language_server/lsp_events_manager.tl -o gen/teal_language_server/lsp_events_manager.lua +luarocks_tree/bin/tl gen src/teal_language_server/lsp_reader_writer.tl -o gen/teal_language_server/lsp_reader_writer.lua +luarocks_tree/bin/tl gen src/teal_language_server/main.tl -o gen/teal_language_server/main.lua +luarocks_tree/bin/tl gen src/teal_language_server/misc_handlers.tl -o gen/teal_language_server/misc_handlers.lua +luarocks_tree/bin/tl gen src/teal_language_server/path.tl -o gen/teal_language_server/path.lua +luarocks_tree/bin/tl gen src/teal_language_server/server_state.tl -o gen/teal_language_server/server_state.lua +luarocks_tree/bin/tl gen src/teal_language_server/stdin_reader.tl -o gen/teal_language_server/stdin_reader.lua +luarocks_tree/bin/tl gen src/teal_language_server/teal_project_config.tl -o gen/teal_language_server/teal_project_config.lua +luarocks_tree/bin/tl gen src/teal_language_server/trace_entry.tl -o gen/teal_language_server/trace_entry.lua +luarocks_tree/bin/tl gen src/teal_language_server/trace_stream.tl -o gen/teal_language_server/trace_stream.lua +luarocks_tree/bin/tl gen src/teal_language_server/tracing.tl -o gen/teal_language_server/tracing.lua +luarocks_tree/bin/tl gen src/teal_language_server/uri.tl -o gen/teal_language_server/uri.lua +luarocks_tree/bin/tl gen src/teal_language_server/util.tl -o gen/teal_language_server/util.lua diff --git a/scripts/run_all.bat b/scripts/run_all.bat index 6bbc848..3bc3b68 100644 --- a/scripts/run_all.bat +++ b/scripts/run_all.bat @@ -7,6 +7,6 @@ call %~dp0lint_teal.bat if %errorlevel% neq 0 exit /b %errorlevel% REM We run setup_local_luarocks again here even though it is already run in generate_lua.bat -REM so that tea-leaves is deployed to luarocks tree +REM so that teal-language-server is deployed to luarocks tree call %~dp0setup_local_luarocks.bat if %errorlevel% neq 0 exit /b %errorlevel% diff --git a/src/tea_leaves/args_parser.tl b/src/teal_language_server/args_parser.tl similarity index 88% rename from src/tea_leaves/args_parser.tl rename to src/teal_language_server/args_parser.tl index d3aa962..8cf369b 100644 --- a/src/tea_leaves/args_parser.tl +++ b/src/teal_language_server/args_parser.tl @@ -1,5 +1,5 @@ -local asserts = require("tea_leaves.asserts") +local asserts = require("teal_language_server.asserts") local record args_parser enum LogMode @@ -16,7 +16,7 @@ end function args_parser.parse_args():args_parser.CommandLineArgs local argparse = require("argparse") - local parser = argparse("tea-leaves", "Tea Leaves") + local parser = argparse("teal-language-server", "Teal Language Server") parser:option("-V --verbose", "") diff --git a/src/tea_leaves/asserts.tl b/src/teal_language_server/asserts.tl similarity index 100% rename from src/tea_leaves/asserts.tl rename to src/teal_language_server/asserts.tl diff --git a/src/tea_leaves/class.d.tl b/src/teal_language_server/class.d.tl similarity index 100% rename from src/tea_leaves/class.d.tl rename to src/teal_language_server/class.d.tl diff --git a/src/tea_leaves/class.lua b/src/teal_language_server/class.lua similarity index 98% rename from src/tea_leaves/class.lua rename to src/teal_language_server/class.lua index 9ef1b43..ee113c9 100644 --- a/src/tea_leaves/class.lua +++ b/src/teal_language_server/class.lua @@ -1,5 +1,5 @@ -local asserts = require("tea_leaves.asserts") +local asserts = require("teal_language_server.asserts") local Class = {} diff --git a/src/tea_leaves/constants.tl b/src/teal_language_server/constants.tl similarity index 100% rename from src/tea_leaves/constants.tl rename to src/teal_language_server/constants.tl diff --git a/src/tea_leaves/document.tl b/src/teal_language_server/document.tl similarity index 96% rename from src/tea_leaves/document.tl rename to src/teal_language_server/document.tl index f607ea4..7b33a5f 100644 --- a/src/tea_leaves/document.tl +++ b/src/teal_language_server/document.tl @@ -1,13 +1,13 @@ local _module_name = "document" -- -local ServerState = require("tea_leaves.server_state") -local Uri = require("tea_leaves.uri") -local lsp = require("tea_leaves.lsp") -local LspReaderWriter = require("tea_leaves.lsp_reader_writer") -local class = require("tea_leaves.class") -local asserts = require("tea_leaves.asserts") -local tracing = require("tea_leaves.tracing") -local util = require("tea_leaves.util") +local ServerState = require("teal_language_server.server_state") +local Uri = require("teal_language_server.uri") +local lsp = require("teal_language_server.lsp") +local LspReaderWriter = require("teal_language_server.lsp_reader_writer") +local class = require("teal_language_server.class") +local asserts = require("teal_language_server.asserts") +local tracing = require("teal_language_server.tracing") +local util = require("teal_language_server.util") local tl = require("tl") diff --git a/src/tea_leaves/document_manager.tl b/src/teal_language_server/document_manager.tl similarity index 76% rename from src/tea_leaves/document_manager.tl rename to src/teal_language_server/document_manager.tl index 37e3a8f..8b605a8 100644 --- a/src/tea_leaves/document_manager.tl +++ b/src/teal_language_server/document_manager.tl @@ -1,12 +1,12 @@ local _module_name = "document_manager" -- -local ServerState = require("tea_leaves.server_state") -local LspReaderWriter = require("tea_leaves.lsp_reader_writer") -local Uri = require("tea_leaves.uri") -local Document = require("tea_leaves.document") -local asserts = require("tea_leaves.asserts") -local class = require("tea_leaves.class") +local ServerState = require("teal_language_server.server_state") +local LspReaderWriter = require("teal_language_server.lsp_reader_writer") +local Uri = require("teal_language_server.uri") +local Document = require("teal_language_server.document") +local asserts = require("teal_language_server.asserts") +local class = require("teal_language_server.class") local record DocumentManager docs:{string:Document} diff --git a/src/tea_leaves/env_updater.tl b/src/teal_language_server/env_updater.tl similarity index 92% rename from src/tea_leaves/env_updater.tl rename to src/teal_language_server/env_updater.tl index fb987a1..e7ebb05 100644 --- a/src/tea_leaves/env_updater.tl +++ b/src/teal_language_server/env_updater.tl @@ -1,15 +1,15 @@ local _module_name = "env_updater" -- -local DocumentManager = require("tea_leaves.document_manager") +local DocumentManager = require("teal_language_server.document_manager") local lusc = require("lusc") -local ServerState = require("tea_leaves.server_state") +local ServerState = require("teal_language_server.server_state") local tl = require("tl") -local TealProjectConfig = require("tea_leaves.teal_project_config") +local TealProjectConfig = require("teal_language_server.teal_project_config") local uv = require("luv") -local asserts = require("tea_leaves.asserts") -local tracing = require("tea_leaves.tracing") -local class = require("tea_leaves.class") +local asserts = require("teal_language_server.asserts") +local tracing = require("teal_language_server.tracing") +local class = require("teal_language_server.class") local init_path = package.path local init_cpath = package.cpath diff --git a/src/tea_leaves/lsp.tl b/src/teal_language_server/lsp.tl similarity index 100% rename from src/tea_leaves/lsp.tl rename to src/teal_language_server/lsp.tl diff --git a/src/tea_leaves/lsp_events_manager.tl b/src/teal_language_server/lsp_events_manager.tl similarity index 89% rename from src/tea_leaves/lsp_events_manager.tl rename to src/teal_language_server/lsp_events_manager.tl index 7f8478b..181e000 100644 --- a/src/tea_leaves/lsp_events_manager.tl +++ b/src/teal_language_server/lsp_events_manager.tl @@ -1,11 +1,11 @@ local _module_name = "lsp_events_manager" -local lsp = require("tea_leaves.lsp") -local LspReaderWriter = require("tea_leaves.lsp_reader_writer") +local lsp = require("teal_language_server.lsp") +local LspReaderWriter = require("teal_language_server.lsp_reader_writer") local lusc = require("lusc") -local asserts = require("tea_leaves.asserts") -local tracing = require("tea_leaves.tracing") -local class = require("tea_leaves.class") +local asserts = require("teal_language_server.asserts") +local tracing = require("teal_language_server.tracing") +local class = require("teal_language_server.class") local record LspEventsManager _lsp_reader_writer: LspReaderWriter diff --git a/src/tea_leaves/lsp_reader_writer.tl b/src/teal_language_server/lsp_reader_writer.tl similarity index 93% rename from src/tea_leaves/lsp_reader_writer.tl rename to src/teal_language_server/lsp_reader_writer.tl index cfb447c..6761860 100644 --- a/src/tea_leaves/lsp_reader_writer.tl +++ b/src/teal_language_server/lsp_reader_writer.tl @@ -1,12 +1,12 @@ local _module_name = "lsp_reader_writer" -local StdinReader = require("tea_leaves.stdin_reader") -local lsp = require("tea_leaves.lsp") +local StdinReader = require("teal_language_server.stdin_reader") +local lsp = require("teal_language_server.lsp") local json = require("dkjson") local uv = require("luv") -local asserts = require("tea_leaves.asserts") -local tracing = require("tea_leaves.tracing") -local class = require("tea_leaves.class") +local asserts = require("teal_language_server.asserts") +local tracing = require("teal_language_server.tracing") +local class = require("teal_language_server.class") local record LspReaderWriter _stdin_reader:StdinReader diff --git a/src/tea_leaves/main.tl b/src/teal_language_server/main.tl similarity index 81% rename from src/tea_leaves/main.tl rename to src/teal_language_server/main.tl index 9d0320d..0bc8ef7 100644 --- a/src/tea_leaves/main.tl +++ b/src/teal_language_server/main.tl @@ -1,20 +1,20 @@ local _module_name = "main" -- -local EnvUpdater = require("tea_leaves.env_updater") -local DocumentManager = require("tea_leaves.document_manager") -local ServerState = require("tea_leaves.server_state") -local LspEventsManager = require("tea_leaves.lsp_events_manager") +local EnvUpdater = require("teal_language_server.env_updater") +local DocumentManager = require("teal_language_server.document_manager") +local ServerState = require("teal_language_server.server_state") +local LspEventsManager = require("teal_language_server.lsp_events_manager") local lusc = require("lusc") local uv = require("luv") -local TraceStream = require("tea_leaves.trace_stream") -local args_parser = require("tea_leaves.args_parser") -local MiscHandlers = require("tea_leaves.misc_handlers") -local StdinReader = require("tea_leaves.stdin_reader") -local LspReaderWriter = require("tea_leaves.lsp_reader_writer") -local tracing = require("tea_leaves.tracing") -local util = require("tea_leaves.util") -local TraceEntry = require("tea_leaves.trace_entry") +local TraceStream = require("teal_language_server.trace_stream") +local args_parser = require("teal_language_server.args_parser") +local MiscHandlers = require("teal_language_server.misc_handlers") +local StdinReader = require("teal_language_server.stdin_reader") +local LspReaderWriter = require("teal_language_server.lsp_reader_writer") +local tracing = require("teal_language_server.tracing") +local util = require("teal_language_server.util") +local TraceEntry = require("teal_language_server.trace_entry") local record IDisposable dispose: function(IDisposable) @@ -65,7 +65,7 @@ local function main() cached_entries = nil - tracing.info(_module_name, "Started new instance tea-leaves. Lua Version: {version}. Platform: {platform}", {_VERSION, util.get_platform()}) + tracing.info(_module_name, "Started new instance teal-language-server. Lua Version: {version}. Platform: {platform}", {_VERSION, util.get_platform()}) tracing.info(_module_name, "Received command line args: {}", {args}) tracing.info(_module_name, "CWD = {cwd}", {uv.cwd()}) diff --git a/src/tea_leaves/misc_handlers.tl b/src/teal_language_server/misc_handlers.tl similarity index 92% rename from src/tea_leaves/misc_handlers.tl rename to src/teal_language_server/misc_handlers.tl index bb88220..2fbd60d 100644 --- a/src/tea_leaves/misc_handlers.tl +++ b/src/teal_language_server/misc_handlers.tl @@ -1,20 +1,20 @@ local _module_name = "misc_handlers" -- -local EnvUpdater = require("tea_leaves.env_updater") -local args_parser = require("tea_leaves.args_parser") -local TraceStream = require("tea_leaves.trace_stream") -local DocumentManager = require("tea_leaves.document_manager") -local ServerState = require("tea_leaves.server_state") -local LspReaderWriter = require("tea_leaves.lsp_reader_writer") -local Path = require("tea_leaves.path") -local Uri = require("tea_leaves.uri") -local lsp = require("tea_leaves.lsp") -local LspEventsManager = require("tea_leaves.lsp_events_manager") +local EnvUpdater = require("teal_language_server.env_updater") +local args_parser = require("teal_language_server.args_parser") +local TraceStream = require("teal_language_server.trace_stream") +local DocumentManager = require("teal_language_server.document_manager") +local ServerState = require("teal_language_server.server_state") +local LspReaderWriter = require("teal_language_server.lsp_reader_writer") +local Path = require("teal_language_server.path") +local Uri = require("teal_language_server.uri") +local lsp = require("teal_language_server.lsp") +local LspEventsManager = require("teal_language_server.lsp_events_manager") local uv = require("luv") -local asserts = require("tea_leaves.asserts") -local tracing = require("tea_leaves.tracing") -local class = require("tea_leaves.class") +local asserts = require("teal_language_server.asserts") +local tracing = require("teal_language_server.tracing") +local class = require("teal_language_server.class") local record MiscHandlers _env_updater: EnvUpdater diff --git a/src/tea_leaves/path.tl b/src/teal_language_server/path.tl similarity index 96% rename from src/tea_leaves/path.tl rename to src/teal_language_server/path.tl index 3005342..4fb005c 100644 --- a/src/tea_leaves/path.tl +++ b/src/teal_language_server/path.tl @@ -1,9 +1,9 @@ local _module_name = "path" -local asserts = require("tea_leaves.asserts") -local class = require("tea_leaves.class") -local util = require("tea_leaves.util") -local tracing = require("tea_leaves.tracing") +local asserts = require("teal_language_server.asserts") +local class = require("teal_language_server.class") +local util = require("teal_language_server.util") +local tracing = require("teal_language_server.tracing") local uv = require("luv") local default_dir_permissions = tonumber('755', 8) diff --git a/src/tea_leaves/server_state.tl b/src/teal_language_server/server_state.tl similarity index 94% rename from src/tea_leaves/server_state.tl rename to src/teal_language_server/server_state.tl index d4c4695..0fe2830 100644 --- a/src/tea_leaves/server_state.tl +++ b/src/teal_language_server/server_state.tl @@ -1,14 +1,14 @@ local _module_name = "server_state" -- -local asserts = require("tea_leaves.asserts") -local lsp = require("tea_leaves.lsp") -local Path = require("tea_leaves.path") +local asserts = require("teal_language_server.asserts") +local lsp = require("teal_language_server.lsp") +local Path = require("teal_language_server.path") local lfs = require("lfs") -local TealProjectConfig = require("tea_leaves.teal_project_config") +local TealProjectConfig = require("teal_language_server.teal_project_config") local tl = require("tl") -local tracing = require("tea_leaves.tracing") -local class = require("tea_leaves.class") +local tracing = require("teal_language_server.tracing") +local class = require("teal_language_server.class") local record ServerState capabilities:{string:any} @@ -239,7 +239,7 @@ class.setup(ServerState, "ServerState", { return capabilities end, name = function():string - return "tea-leaves" + return "teal-language-server" end, version = function():string return "0.0.1" diff --git a/src/tea_leaves/stdin_reader.tl b/src/teal_language_server/stdin_reader.tl similarity index 93% rename from src/tea_leaves/stdin_reader.tl rename to src/teal_language_server/stdin_reader.tl index d8afe1d..0d3b2cd 100644 --- a/src/tea_leaves/stdin_reader.tl +++ b/src/teal_language_server/stdin_reader.tl @@ -2,10 +2,10 @@ local _module_name = "stdin_reader" -- local lusc = require("lusc") -local asserts = require("tea_leaves.asserts") +local asserts = require("teal_language_server.asserts") local uv = require("luv") -local tracing = require("tea_leaves.tracing") -local class = require("tea_leaves.class") +local tracing = require("teal_language_server.tracing") +local class = require("teal_language_server.class") local record StdinReader _stdin: uv.Pipe diff --git a/src/tea_leaves/teal_project_config.tl b/src/teal_language_server/teal_project_config.tl similarity index 100% rename from src/tea_leaves/teal_project_config.tl rename to src/teal_language_server/teal_project_config.tl diff --git a/src/tea_leaves/trace_entry.tl b/src/teal_language_server/trace_entry.tl similarity index 100% rename from src/tea_leaves/trace_entry.tl rename to src/teal_language_server/trace_entry.tl diff --git a/src/tea_leaves/trace_stream.tl b/src/teal_language_server/trace_stream.tl similarity index 91% rename from src/tea_leaves/trace_stream.tl rename to src/teal_language_server/trace_stream.tl index 6993dcf..0b0fe17 100644 --- a/src/tea_leaves/trace_stream.tl +++ b/src/teal_language_server/trace_stream.tl @@ -1,11 +1,11 @@ -local util = require("tea_leaves.util") -local asserts = require("tea_leaves.asserts") -local Path = require("tea_leaves.path") -local TraceEntry = require("tea_leaves.trace_entry") +local util = require("teal_language_server.util") +local asserts = require("teal_language_server.asserts") +local Path = require("teal_language_server.path") +local TraceEntry = require("teal_language_server.trace_entry") local json = require("dkjson") local uv = require("luv") -local class = require("tea_leaves.class") +local class = require("teal_language_server.class") local inspect = require("inspect") local record TraceStream @@ -67,7 +67,7 @@ end function TraceStream:_get_log_dir():Path local homedir = Path(assert(uv.os_homedir())) asserts.that(homedir:exists()) - local log_dir = homedir:join(".cache"):join("tea-leaves") + local log_dir = homedir:join(".cache"):join("teal-language-server") if not log_dir:is_directory() then log_dir:create_directory() @@ -82,7 +82,7 @@ function TraceStream:_choose_log_file_path():Path local date = os.date("*t") local pid = uv.os_getpid() - -- Need to use pid since there can be many instances of tea-leaves running at same time + -- Need to use pid since there can be many instances of teal-language-server running at same time return log_dir:join(string.format("%d-%d-%d_%d.txt", date.year, date.month, date.day, pid)) end diff --git a/src/tea_leaves/tracing.tl b/src/teal_language_server/tracing.tl similarity index 97% rename from src/tea_leaves/tracing.tl rename to src/teal_language_server/tracing.tl index 4235511..06971a4 100644 --- a/src/tea_leaves/tracing.tl +++ b/src/teal_language_server/tracing.tl @@ -1,6 +1,6 @@ -local TraceEntry = require("tea_leaves.trace_entry") -local asserts = require("tea_leaves.asserts") +local TraceEntry = require("teal_language_server.trace_entry") +local asserts = require("teal_language_server.asserts") local uv = require("luv") local record tracing diff --git a/src/tea_leaves/uri.tl b/src/teal_language_server/uri.tl similarity index 96% rename from src/tea_leaves/uri.tl rename to src/teal_language_server/uri.tl index c6dd471..02f70ce 100644 --- a/src/tea_leaves/uri.tl +++ b/src/teal_language_server/uri.tl @@ -1,6 +1,6 @@ -local asserts = require("tea_leaves.asserts") -local util = require("tea_leaves.util") +local asserts = require("teal_language_server.asserts") +local util = require("teal_language_server.util") --[[ uri spec: diff --git a/src/tea_leaves/util.tl b/src/teal_language_server/util.tl similarity index 98% rename from src/tea_leaves/util.tl rename to src/teal_language_server/util.tl index b04cb75..ad03ebd 100644 --- a/src/tea_leaves/util.tl +++ b/src/teal_language_server/util.tl @@ -1,7 +1,7 @@ local _module_name = "util" local uv = require("luv") -local tracing = require("tea_leaves.tracing") +local tracing = require("teal_language_server.tracing") local record util record TryOpts diff --git a/tea-leaves-0.0.2-1.rockspec b/tea-leaves-0.0.2-1.rockspec index 416bbf6..46de92c 100644 --- a/tea-leaves-0.0.2-1.rockspec +++ b/tea-leaves-0.0.2-1.rockspec @@ -1,14 +1,14 @@ rockspec_format = "3.0" -package = "tea-leaves" +package = "teal-language-server" version = "0.0.2-1" source = { - url = "git+https://github.com/svermeulen/tea-leaves.git", + url = "git+https://github.com/svermeulen/teal-language-server.git", branch = "main" } description = { summary = "A language server for the Teal language", detailed = "A language server for the Teal language", - homepage = "https://github.com/svermeulen/tea-leaves", + homepage = "https://github.com/svermeulen/teal-language-server", license = "MIT" } dependencies = { @@ -23,31 +23,31 @@ dependencies = { build = { type = "builtin", modules = { - ["tea_leaves.args_parser"] = "gen/tea_leaves/args_parser.lua", - ["tea_leaves.asserts"] = "gen/tea_leaves/asserts.lua", - ["tea_leaves.class"] = "gen/tea_leaves/class.lua", - ["tea_leaves.constants"] = "gen/tea_leaves/constants.lua", - ["tea_leaves.document"] = "gen/tea_leaves/document.lua", - ["tea_leaves.document_manager"] = "gen/tea_leaves/document_manager.lua", - ["tea_leaves.env_updater"] = "gen/tea_leaves/env_updater.lua", - ["tea_leaves.lsp"] = "gen/tea_leaves/lsp.lua", - ["tea_leaves.lsp_events_manager"] = "gen/tea_leaves/lsp_events_manager.lua", - ["tea_leaves.lsp_reader_writer"] = "gen/tea_leaves/lsp_reader_writer.lua", - ["tea_leaves.main"] = "gen/tea_leaves/main.lua", - ["tea_leaves.misc_handlers"] = "gen/tea_leaves/misc_handlers.lua", - ["tea_leaves.path"] = "gen/tea_leaves/path.lua", - ["tea_leaves.server_state"] = "gen/tea_leaves/server_state.lua", - ["tea_leaves.stdin_reader"] = "gen/tea_leaves/stdin_reader.lua", - ["tea_leaves.teal_project_config"] = "gen/tea_leaves/teal_project_config.lua", - ["tea_leaves.trace_entry"] = "gen/tea_leaves/trace_entry.lua", - ["tea_leaves.trace_stream"] = "gen/tea_leaves/trace_stream.lua", - ["tea_leaves.tracing"] = "gen/tea_leaves/tracing.lua", - ["tea_leaves.uri"] = "gen/tea_leaves/uri.lua", - ["tea_leaves.util"] = "gen/tea_leaves/util.lua", + ["teal_language_server.args_parser"] = "gen/teal_language_server/args_parser.lua", + ["teal_language_server.asserts"] = "gen/teal_language_server/asserts.lua", + ["teal_language_server.class"] = "gen/teal_language_server/class.lua", + ["teal_language_server.constants"] = "gen/teal_language_server/constants.lua", + ["teal_language_server.document"] = "gen/teal_language_server/document.lua", + ["teal_language_server.document_manager"] = "gen/teal_language_server/document_manager.lua", + ["teal_language_server.env_updater"] = "gen/teal_language_server/env_updater.lua", + ["teal_language_server.lsp"] = "gen/teal_language_server/lsp.lua", + ["teal_language_server.lsp_events_manager"] = "gen/teal_language_server/lsp_events_manager.lua", + ["teal_language_server.lsp_reader_writer"] = "gen/teal_language_server/lsp_reader_writer.lua", + ["teal_language_server.main"] = "gen/teal_language_server/main.lua", + ["teal_language_server.misc_handlers"] = "gen/teal_language_server/misc_handlers.lua", + ["teal_language_server.path"] = "gen/teal_language_server/path.lua", + ["teal_language_server.server_state"] = "gen/teal_language_server/server_state.lua", + ["teal_language_server.stdin_reader"] = "gen/teal_language_server/stdin_reader.lua", + ["teal_language_server.teal_project_config"] = "gen/teal_language_server/teal_project_config.lua", + ["teal_language_server.trace_entry"] = "gen/teal_language_server/trace_entry.lua", + ["teal_language_server.trace_stream"] = "gen/teal_language_server/trace_stream.lua", + ["teal_language_server.tracing"] = "gen/teal_language_server/tracing.lua", + ["teal_language_server.uri"] = "gen/teal_language_server/uri.lua", + ["teal_language_server.util"] = "gen/teal_language_server/util.lua", }, install = { bin = { - ['tea-leaves'] = 'bin/tea-leaves' + ['teal-language-server'] = 'bin/teal-language-server' } } }