Language Server Protocol implementation for Turtle and RDF
Project description
Turtle Language Server
This is a LSP server implementation for RDF graphs serialized as Turtle.
Install with: pip install turtle_language_server
Commands and Features
-
Use the
loadGraphs
command to pull in the graph definitions listed as prefixes in your Turtle file:# caches graphs in-memory for NeoVim session :CocCommand loadGraphs
# overrides cache and pulls graphs anyway :CocCommand loadGraphs force
-
syntax checking your Turtle file (including undefined namespaces)
-
auto-complete when adding statements to the file (relies on
loadGraphs
)
TODOs:
- verify shapes and add validation information to UI
Setup With NeoVim and CoC
If you are using coc.nvim
, you can configure the language server as follows:
-
Make sure Vim correctly detects turtle files and sets the filetype. One way to achieve this is by adding the following line to your
.vimrc
orinit.nvim
:au BufRead,BufNewFile *.ttl set filetype=turtle
-
Modify your CoC settings to use the
turtle_language_server
when you open a Turtle file.- First, run
:CocConfig
or editcoc-settings.json
- Add the following (merge with existing keys in
"languageserver"
if needed):{ "languageserver": { "turtle": { "command": "turtle_langserver", "filetypes": ["ttl", "turtle"] } } }
- First, run
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for turtle-language-server-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2c8b5e668bff2830e501e4aeef033bdb068b776d36fd559d958ec1ca5f5f549 |
|
MD5 | 9cad8bfadea542de9a026fb637641648 |
|
BLAKE2b-256 | c2f5efc148eb011c79c0883a48e585484240a978374ac454c2c000301adb3c02 |
Hashes for turtle_language_server-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8d26975b60f54899f0a6862187ad54d994504bd17bad87f3e27f2783925082d |
|
MD5 | eade67bb44c9baf805ab8f94cc720e9e |
|
BLAKE2b-256 | 62d02397915fdebf18fc14a0b415a94680b511965e03848ce4650cc04e83ab0f |