Skip to content

yaegassy/coc-ruby-syntax-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

coc-ruby-syntax-tree

fork from a ruby-syntax-tree/vscode-syntax-tree

coc.nvim support for the syntax_tree gem

DEMO

coc-ruby-syntax-tree-demo.mp4

!!Note & Warning!!

I don't use ruby regularly, so if you like ruby, please refer to this repository and create coc-ruby-syntax-tree by yourself.

Install

You need to have coc.nvim installed for this extension to work.

e.g. vim-plug:

Plug 'yaegassy/coc-ruby-syntax-tree', {'do': 'yarn install --frozen-lockfile'}

Usage

syntax_tree (stree) must be installed in the project or installed globally. Alternatively, you can also set the stree executable path in the syntaxTree.advanced.commandPath settings.

Features

  • textDocument/formatting
  • textDocument/inlayHint
  • syntaxTree/visualizing

inlayHint(Vim9)

coc-ruby-syntax-tree-inlayhints-vim9

inlayHint(Neovim)

coc-ruby-syntax-tree-inlayhints-neovim

syntaxTree/visualizing

coc-ruby-syntax-tree-visualize

Configuration options

  • syntaxTree.enable: Enable coc-ruby-syntax-tree extension, default: true
  • syntaxTree.advanced.commandPath: Absolute path to stree executable, default: ""
  • syntaxTree.additionalPlugins: Registers extra behaviors with the language server, default: []
  • syntaxTree.ignoreFiles: A glob pattern of files to ignore for formatting, default: ""
  • syntaxTree.printWidth: The width to be used when formatting code, default: null
  • syntaxTree.singleQuotes: Uses single-quoted strings when possible, default: false
  • syntaxTree.trailingComma: Adds a trailing comma to multi-line array literals, hash literals, and method parameters, default: false

Commands

  • syntaxTree.start: Syntax Tree: Start
  • syntaxTree.stop: Syntax Tree: Stop
  • syntaxTree.restart: Syntax Tree: Restart
  • syntaxTree.showOutputChannel: Syntax Tree: Show Output Channel
  • syntaxTree.visualize: Syntax Tree: Visualize

Thanks

License

MIT


This extension is built with create-coc-extension