93595f8 Can't use 'import std;' yet. Compile via SCons.
~wahn pushed to ~wahn/lsp-testing git
See https://www.janwalter.org/jekyll/lsp/2022/10/01/language-servers.html for now.
% make
% make clean
For each language there should be at least one Hello World
program. See:
https://en.wikipedia.org/wiki/%22Hello,_World!%22_program
#include <stdio.h>
#include <stdlib.h>
int main() {
printf("Hello, World!\n");
return EXIT_SUCCESS;
}
Other examples:
libc.so
(does not work on Mac OSX)#include <iostream>
int main() {
std::cout << "Hello, World!\n";
return EXIT_SUCCESS;
}
(println "Hello, World!")
-module(hello).
-export([hello_world/0]).
hello_world() -> io:fwrite("Hello, World!\n").
main :: IO ()
main = putStrLn "Hello, World!"
print("Hello, World!")
fn main() {
println!("Hello, World!");
}
The Hello World
program on Wikipedia is here:
https://en.wikipedia.org/wiki/Scala_(programming_language)#%22Hello_World%22_example
@main def main() = {
println("Hello, World!")
}
No Hello World
program on Wikipedia (yet):
https://ziglang.org/documentation/master/
const std = @import("std");
pub fn main() !void {
const stdout = std.io.getStdOut().writer();
try stdout.print("Hello, {s}!", .{"World"});
}
% hx --health c
Configured language server: clangd
Binary for language server: /usr/local/Cellar/llvm/15.0.1/bin/clangd
Configured debug adapter: lldb-vscode
Binary for debug adapter: /usr/local/Cellar/llvm/15.0.1/bin/lldb-vscode
Highlight queries: ✓
Textobject queries: ✓
Indent queries: ✓
% hx --health cpp
Configured language server: clangd
Binary for language server: /usr/local/Cellar/llvm/15.0.1/bin/clangd
Configured debug adapter: lldb-vscode
Binary for debug adapter: /usr/local/Cellar/llvm/15.0.1/bin/lldb-vscode
Highlight queries: ✓
Textobject queries: ✓
Indent queries: ✓
% hx --health clojure
Configured language server: clojure-lsp
Binary for language server: /usr/local/bin/clojure-lsp
Configured debug adapter: None
Highlight queries: ✓
Textobject queries: ✘
Indent queries: ✘
https://github.com/erlang-ls/erlang_ls
% hx --health erlang
Configured language server: erlang_ls
Binary for language server: /Users/jan/git/github/erlang_ls/_build/default/bin/erlang_ls
Configured debug adapter: None
Highlight queries: ✓
Textobject queries: ✓
Indent queries: ✘
Install ghc and cabal-install:
% brew install ghc cabal-install
Download the language server haskell-language-server
from:
https://downloads.haskell.org/~hls/haskell-language-server-1.8.0.0/
After that we should be fine:
% hx --health haskell
Configured language server: haskell-language-server-wrapper
Binary for language server: /usr/local/haskell-language-server-1.8.0.0/bin/haskell-language-server-wrapper
Configured debug adapter: None
Highlight queries: ✓
Textobject queries: ✘
Indent queries: ✘
% hx --health python
Configured language server: pylsp
Binary for language server: /Users/jan/.local/bin/pylsp
Configured debug adapter: None
Highlight queries: ✓
Textobject queries: ✓
Indent queries: ✘
% hx --health rust
Configured language server: rust-analyzer
Binary for language server: /usr/local/bin/rust-analyzer
Configured debug adapter: lldb-vscode
Binary for debug adapter: /usr/local/Cellar/llvm/15.0.1/bin/lldb-vscode
Highlight queries: ✓
Textobject queries: ✓
Indent queries: ✓
Install coursier and metals (via coursier):
% brew install coursier/formulas/coursier
% cs setup
% coursier install metals
After that we should be fine:
% hx --health scala
Configured language server: metals
Binary for language server: /Users/jan/Library/Application Support/Coursier/bin/metals
Configured debug adapter: None
Highlight queries: ✓
Textobject queries: ✘
Indent queries: ✓
% hx --health zig
Configured language server: zls
Binary for language server: /Users/jan/zls/zls
Configured debug adapter: None
Highlight queries: ✓
Textobject queries: ✘
Indent queries: ✓