Git Product home page Git Product logo

vimscript-language-server's Introduction

Build Status

Vim script Language Server

Implementation of Language Server protocol for Vim script / vimL language in Rust.

This project is still in very early development stage - it does not support all of Vim script syntax and most features are not implemented yet.

The long term goal is to implement Vim script AST that will allow for:

  • building language server
  • building Vim script formatter, that vim plugins could use in CI
  • building linter, that vim plugin could use in CI

The next steps:

  • perform additional analysis on AST (e.g. variable tracking), to allow for features like renaming,
  • build a foundation for formatter,
  • build a foundation for generic linter (so that custom checks can be added),
  • support all syntax of Vim script.

Setup

Build

$ cargo build

Then, copy built binary to a location that is in your PATH.

Configure in vim-lsp

if executable('vimscript-language-server')
  au User lsp_setup call lsp#register_server({
          \ 'name': 'vimscript-language-server',
          \ 'cmd': {server_info->['vimscript-language-server']},
          \ 'whitelist': ['vim'],
          \ })
endif

Contributing

See Contributing.md.


This is not an officially supported Google product

vimscript-language-server's People

Contributors

doriath avatar itchyny avatar ujihisa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vimscript-language-server's Issues

What is WrapLspTee referenced in README?

The setup example in the README references a WrapLspTee helper that isn't defined on my system:

if executable('vimscript-language-server')
  au User lsp_setup call lsp#register_server({
          \ 'name': 'vimscript-language-server',
          \ 'cmd': {server_info->WrapLspTee(['vimscript-language-server'])},
          \ 'whitelist': ['vim'],
          \ })
endif
Error detected while processing VimEnter Autocommands for "*"..function lsp#enable[22]..<SNR>134_register_events[20]..<SNR>134_on_text_document_did_open[12]..<SNR>134_ensure_flush[1]..lsp#utils#step#start[1]..<SNR>212_next[9]..<lambda>35[1]..<SNR>134_ensure_start[33]..<lambda>8:
line    1:
E117: Unknown function: WrapLspTee

Is that supposed to be defined somewhere, or was it some debugging code accidentally checked in?

Setup AST module inside syntax crate

Similar to rust-analyzer, we should create ast module inside syntax crate, that will contain the concrete AST types instead of CST (GreenNode)

Setup unit tests for lexer

Dependency:

  • #7 Setup new lexer in syntax crate

The goal is to setup unit tests for syntax/src/lexer module (to be created in #7), similar to how parser tests are created (directory with input and expected output).

Example:

# /syntax/test_data/lexer/test.vim
let x = 5
# /syntax/test_data/lexer/test.txt
LET_KW 3 "let"
WHITESPACE 1 " "
IDENT 1 "x"
...

Setup new lexer in syntax crate

Tasks:

  • move lex method from syntax/src/lib.rs to syntax/src/lexer.rs
  • change the return type from Vec<(SyntaxKind, SmolStr)> to Vec<(SyntaxKind, TextSize)>

Cleanup Position & Location types

Currently we have many types for location and positions and it is very messy.

  • Define what is a Position and what is a Location
  • Use one set of types consistently everywhere in the codebase
  • Provide easy conversion between internal types and LSP types

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.