uiua: Extract to zed-extensions/uiua repository (#26587)
This PR extracts the Uiua extension to the [zed-extensions/uiua](https://github.com/zed-extensions/uiua) repository. Release Notes: - N/A
This commit is contained in:
parent
c8b782d870
commit
3ec323ce0d
10 changed files with 1 additions and 132 deletions
7
Cargo.lock
generated
7
Cargo.lock
generated
|
@ -17233,13 +17233,6 @@ dependencies = [
|
||||||
"zed_extension_api 0.1.0",
|
"zed_extension_api 0.1.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "zed_uiua"
|
|
||||||
version = "0.0.1"
|
|
||||||
dependencies = [
|
|
||||||
"zed_extension_api 0.1.0",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zeno"
|
name = "zeno"
|
||||||
version = "0.2.3"
|
version = "0.2.3"
|
||||||
|
|
|
@ -179,7 +179,6 @@ members = [
|
||||||
"extensions/snippets",
|
"extensions/snippets",
|
||||||
"extensions/test-extension",
|
"extensions/test-extension",
|
||||||
"extensions/toml",
|
"extensions/toml",
|
||||||
"extensions/uiua",
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Tooling
|
# Tooling
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
[Uiua](https://www.uiua.org/) is a general purpose, stack-based, array-oriented programming language with a focus on simplicity, beauty, and tacit code.
|
[Uiua](https://www.uiua.org/) is a general purpose, stack-based, array-oriented programming language with a focus on simplicity, beauty, and tacit code.
|
||||||
|
|
||||||
Uiua support is available through the [Uiua extension](https://github.com/zed-industries/zed/tree/main/extensions/uiua).
|
Uiua support is available through the [Uiua extension](https://github.com/zed-extensions/uiua).
|
||||||
|
|
||||||
- Tree-sitter: [shnarazk/tree-sitter-uiua](https://github.com/shnarazk/tree-sitter-uiua)
|
- Tree-sitter: [shnarazk/tree-sitter-uiua](https://github.com/shnarazk/tree-sitter-uiua)
|
||||||
- Language Server: [uiua-lang/uiua](https://github.com/uiua-lang/uiua/)
|
- Language Server: [uiua-lang/uiua](https://github.com/uiua-lang/uiua/)
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
[package]
|
|
||||||
name = "zed_uiua"
|
|
||||||
version = "0.0.1"
|
|
||||||
edition.workspace = true
|
|
||||||
publish.workspace = true
|
|
||||||
license = "Apache-2.0"
|
|
||||||
|
|
||||||
[lints]
|
|
||||||
workspace = true
|
|
||||||
|
|
||||||
[lib]
|
|
||||||
path = "src/uiua.rs"
|
|
||||||
crate-type = ["cdylib"]
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
zed_extension_api = "0.1.0"
|
|
|
@ -1 +0,0 @@
|
||||||
../../LICENSE-APACHE
|
|
|
@ -1,15 +0,0 @@
|
||||||
id = "uiua"
|
|
||||||
name = "Uiua"
|
|
||||||
description = "Uiua support."
|
|
||||||
version = "0.0.1"
|
|
||||||
schema_version = 1
|
|
||||||
authors = ["Max Brunsfeld <max@zed.dev>"]
|
|
||||||
repository = "https://github.com/zed-industries/zed"
|
|
||||||
|
|
||||||
[language_servers.uiua]
|
|
||||||
name = "Uiua LSP"
|
|
||||||
language = "Uiua"
|
|
||||||
|
|
||||||
[grammars.uiua]
|
|
||||||
repository = "https://github.com/shnarazk/tree-sitter-uiua"
|
|
||||||
commit = "21dc2db39494585bf29a3f86d5add6e9d11a22ba"
|
|
|
@ -1,11 +0,0 @@
|
||||||
name = "Uiua"
|
|
||||||
grammar = "uiua"
|
|
||||||
path_suffixes = ["ua"]
|
|
||||||
line_comments = ["# "]
|
|
||||||
autoclose_before = ")]}\""
|
|
||||||
brackets = [
|
|
||||||
{ start = "{", end = "}", close = true, newline = false},
|
|
||||||
{ start = "[", end = "]", close = true, newline = false },
|
|
||||||
{ start = "(", end = ")", close = true, newline = false },
|
|
||||||
{ start = "\"", end = "\"", close = true, newline = false, not_in = ["string"] },
|
|
||||||
]
|
|
|
@ -1,50 +0,0 @@
|
||||||
[
|
|
||||||
(openParen)
|
|
||||||
(closeParen)
|
|
||||||
(openCurly)
|
|
||||||
(closeCurly)
|
|
||||||
(openBracket)
|
|
||||||
(closeBracket)
|
|
||||||
] @punctuation.bracket
|
|
||||||
|
|
||||||
[
|
|
||||||
(branchSeparator)
|
|
||||||
(underscore)
|
|
||||||
] @constructor
|
|
||||||
; ] @punctuation.delimiter
|
|
||||||
|
|
||||||
[ (character) ] @constant.character
|
|
||||||
[ (comment) ] @comment
|
|
||||||
[ (constant) ] @constant.numeric
|
|
||||||
[ (identifier) ] @variable
|
|
||||||
[ (leftArrow) ] @keyword
|
|
||||||
[ (function) ] @function
|
|
||||||
[ (modifier1) ] @operator
|
|
||||||
[ (modifier2) ] @operator
|
|
||||||
[ (number) ] @constant.numeric
|
|
||||||
[ (placeHolder) ] @special
|
|
||||||
[ (otherConstant) ] @string.special
|
|
||||||
[ (signature) ] @type
|
|
||||||
[ (system) ] @function.builtin
|
|
||||||
[ (tripleMinus) ] @module
|
|
||||||
|
|
||||||
; planet
|
|
||||||
[
|
|
||||||
"id"
|
|
||||||
"identity"
|
|
||||||
"∘"
|
|
||||||
"dip"
|
|
||||||
"⊙"
|
|
||||||
"gap"
|
|
||||||
"⋅"
|
|
||||||
] @tag
|
|
||||||
|
|
||||||
[
|
|
||||||
(string)
|
|
||||||
(multiLineString)
|
|
||||||
] @string
|
|
||||||
|
|
||||||
; [
|
|
||||||
; (deprecated)
|
|
||||||
; (identifierDeprecated)
|
|
||||||
; ] @warning
|
|
|
@ -1,3 +0,0 @@
|
||||||
[
|
|
||||||
(array)
|
|
||||||
] @indent
|
|
|
@ -1,27 +0,0 @@
|
||||||
use zed_extension_api::{self as zed, Result};
|
|
||||||
|
|
||||||
struct UiuaExtension;
|
|
||||||
|
|
||||||
impl zed::Extension for UiuaExtension {
|
|
||||||
fn new() -> Self {
|
|
||||||
Self
|
|
||||||
}
|
|
||||||
|
|
||||||
fn language_server_command(
|
|
||||||
&mut self,
|
|
||||||
_language_server_id: &zed::LanguageServerId,
|
|
||||||
worktree: &zed::Worktree,
|
|
||||||
) -> Result<zed::Command> {
|
|
||||||
let path = worktree
|
|
||||||
.which("uiua")
|
|
||||||
.ok_or_else(|| "uiua is not installed".to_string())?;
|
|
||||||
|
|
||||||
Ok(zed::Command {
|
|
||||||
command: path,
|
|
||||||
args: vec!["lsp".to_string()],
|
|
||||||
env: Default::default(),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
zed::register_extension!(UiuaExtension);
|
|
Loading…
Add table
Add a link
Reference in a new issue