https://github.com/lcian/gringo-language-server
🛠️ Language Server for gringo (Answer Set Programming)
https://github.com/lcian/gringo-language-server
answer-set-programming language-server-protocol logic-programming lsp
Last synced: 3 months ago
JSON representation
🛠️ Language Server for gringo (Answer Set Programming)
- Host: GitHub
- URL: https://github.com/lcian/gringo-language-server
- Owner: lcian
- License: mit
- Created: 2024-07-24T21:35:31.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-09-13T11:13:23.000Z (8 months ago)
- Last Synced: 2025-01-11T15:21:41.588Z (4 months ago)
- Topics: answer-set-programming, language-server-protocol, logic-programming, lsp
- Language: Rust
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gringo-language-server
This is an LSP server for the gringo (clasp, Answer Set Programming) language.
It provides errors, warnings and code completion.

# Installation (Neovim)
0. install Rust: `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`
1. install this LSP server: `cargo install --git https://github.com/lcian/gringo-language-server`
2. add the following code to your `init.lua`:
```lua
vim.filetype.add({
extension = {
lp = "gringo"
}
})local name = "gringo-language-server"
local client = vim.lsp.start_client {
name = name,
cmd = { name },
}
if not client then
vim.notify ("Something went wrong when starting " .. name)
return
endvim.api.nvim_create_autocmd("FileType", {
pattern = "gringo",
callback = function ()
vim.lsp.buf_attach_client(0, client)
end,
})
```