Skip to content

Commit

Permalink
Renamed everything from tea-leaves to teal-language-server
Browse files Browse the repository at this point in the history
  • Loading branch information
svermeulen committed Aug 27, 2024
1 parent cb71d39 commit 6c2680c
Show file tree
Hide file tree
Showing 49 changed files with 248 additions and 248 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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

Expand All @@ -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`

2 changes: 1 addition & 1 deletion bin/tea-leaves
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env lua
require('tea_leaves.main')
require('teal_language_server.main')
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

local asserts = require("tea_leaves.asserts")
local asserts = require("teal_language_server.asserts")

local args_parser = {CommandLineArgs = {}, }

Expand All @@ -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", "")

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

local asserts = require("tea_leaves.asserts")
local asserts = require("teal_language_server.asserts")

local Class = {}

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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")

Expand Down
Original file line number Diff line number Diff line change
@@ -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 = {}

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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 = {}

Expand Down
Original file line number Diff line number Diff line change
@@ -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 = {}

Expand Down
26 changes: 13 additions & 13 deletions gen/tea_leaves/main.lua → gen/teal_language_server/main.lua
Original file line number Diff line number Diff line change
@@ -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")



Expand Down Expand Up @@ -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() })

Expand Down
Original file line number Diff line number Diff line change
@@ -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 = {}

Expand Down
8 changes: 4 additions & 4 deletions gen/tea_leaves/path.lua → gen/teal_language_server/path.lua
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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 = {}

Expand Down Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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 = {}
Expand Down Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
@@ -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 = {}
Expand Down
4 changes: 2 additions & 2 deletions gen/tea_leaves/uri.lua → gen/teal_language_server/uri.lua
Original file line number Diff line number Diff line change
@@ -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")



Expand Down
Original file line number Diff line number Diff line change
@@ -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 = {}, }

Expand Down
Loading

0 comments on commit 6c2680c

Please sign in to comment.