-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaced repo with contents from svermeulen/tea-leaves as per issue #16
- Loading branch information
1 parent
67b5d7c
commit 35cc30a
Showing
84 changed files
with
11,698 additions
and
2,001 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
name: test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
luaVersion: ["5.1", "5.2", "5.3", "5.4" ] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@main | ||
|
||
- name: Install Lua | ||
uses: leafo/[email protected] | ||
with: | ||
luaVersion: ${{ matrix.luaVersion }} | ||
|
||
- name: Install LuaRocks | ||
uses: leafo/[email protected] | ||
|
||
- name: Build | ||
run: scripts/setup_local_luarocks.sh | ||
|
||
- name: Lint | ||
run: scripts/lint_teal.sh | ||
|
||
- name: Check for untracked or modified files | ||
run: | | ||
if [ -n "$(git status --porcelain)" ]; then | ||
echo "Error: Untracked or modified files found." | ||
git status | ||
exit 1 | ||
else | ||
echo "No untracked or modified files." | ||
fi | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
teal-language-server.log | ||
/luarocks | ||
/lua | ||
/lua_modules | ||
/.luarocks | ||
/luarocks.bat | ||
/lua.bat | ||
/luarocks_tree | ||
/*.src.rock | ||
|
||
# install dirs on CI machine | ||
/.install | ||
/.lua |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Steve Vermeulen | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,54 @@ | ||
# WIP and Currently (Very) Unstable | ||
This is very much a work in progress. Work is being done in the Teal compiler itself to make development of this easier and the cli is undergoing changes as well to help with the project management tools that a language server expects to have (such as being able to properly load `tlconfig.lua`). | ||
|
||
Check out the Teal gitter if you would like to contribute | ||
# Tea Leaves | ||
|
||
[![Join the chat at https://gitter.im/dotnet/coreclr](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/teal-language/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
A language server for the [Teal language](https://github.com/teal-language/tl) | ||
|
||
``` | ||
luarocks install --dev teal-language-server | ||
``` | ||
[![test](https://github.com/svermeulen/tea-leaves/actions/workflows/test.yml/badge.svg)](https://github.com/svermeulen/tea-leaves/actions/workflows/test.yml) | ||
|
||
# Installation | ||
|
||
### From luarocks | ||
|
||
# teal-language-server | ||
* `luarocks install tea-leaves` | ||
* `tea-leaves` | ||
|
||
Currently the server only implements: | ||
- `textDocument/didOpen` | ||
- `textDocument/didSave` | ||
- `textDocument/didClose` | ||
- `textDocument/hover` | ||
Tested on Windows, Linux and MacOS | ||
|
||
And just runs a simple type check | ||
### From source | ||
|
||
# Setup | ||
* Clone repo | ||
* From repo root: | ||
* `scripts/setup_local_luarocks` | ||
* `./lua_modules/bin/tea-leaves` | ||
|
||
If you can get this working with your editor, please open an issue/pr to add it here! | ||
# Features | ||
|
||
### Neovim 0.7 | ||
* Go to definition (`textDocument/definition`) | ||
* Linting (`textDocument/publishDiagnostics`) | ||
* Intellisense (`textDocument/completion`) | ||
* Hover (`textDocument/hover`) | ||
|
||
# Editor Setup | ||
|
||
### Neovim | ||
|
||
Install the [lspconfig plugin](https://github.com/neovim/nvim-lspconfig) and put the following in your `init.vim` or `init.lua` | ||
|
||
```lua | ||
local lspconfig = require("lspconfig") | ||
|
||
lspconfig.teal_ls.setup {} | ||
lspconfig.tea_leaves.setup {} | ||
``` | ||
|
||
# Usage | ||
|
||
``` | ||
tea-leaves [--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` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env lua | ||
require('tea_leaves.main') |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.