Skip to main content

Language Server Protocol implementation for Turtle and RDF

Project description

Turtle Language Server

PyPI version

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:

  1. 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 or init.nvim:

    au BufRead,BufNewFile *.ttl set filetype=turtle
    
  2. Modify your CoC settings to use the turtle_language_server when you open a Turtle file.

    1. First, run :CocConfig or edit coc-settings.json
    2. Add the following (merge with existing keys in "languageserver" if needed):
      {
        "languageserver": {
          "turtle": {
            "command": "turtle_langserver",
            "filetypes": ["ttl", "turtle"]
          }
        }
      }
      

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

turtle-language-server-0.1.2.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

turtle_language_server-0.1.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file turtle-language-server-0.1.2.tar.gz.

File metadata

  • Download URL: turtle-language-server-0.1.2.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.6 Linux/5.8.0-7630-generic

File hashes

Hashes for turtle-language-server-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a2c8b5e668bff2830e501e4aeef033bdb068b776d36fd559d958ec1ca5f5f549
MD5 9cad8bfadea542de9a026fb637641648
BLAKE2b-256 c2f5efc148eb011c79c0883a48e585484240a978374ac454c2c000301adb3c02

See more details on using hashes here.

File details

Details for the file turtle_language_server-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for turtle_language_server-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c8d26975b60f54899f0a6862187ad54d994504bd17bad87f3e27f2783925082d
MD5 eade67bb44c9baf805ab8f94cc720e9e
BLAKE2b-256 62d02397915fdebf18fc14a0b415a94680b511965e03848ce4650cc04e83ab0f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page