Skip to content

ericoporto/ags-script-language-server

 
 

Repository files navigation

AGS Script Language Server

WARNING: WORK IN PROGRESS

Based on the Bash Language Server from Mads Hartmann.

Bash Language Server

Bash language server implementation based on Tree Sitter and its grammar for Bash.

Features

  • Jump to declaration
  • Find references
  • Code Outline & Show Symbols
  • Highlight occurrences
  • Code completion
  • Simple diagnostics reporting
  • Documentation for flags on hover
  • Workspace symbols
  • Rename symbol

Installation

npm i -g ags-script-language-server

If you encounter installation errors, ensure you have node version 8 or newer (node --version).

Clients

The following editors and IDEs have available clients:

Vim

For Vim 8 or later install the plugin prabirshrestha/vim-lsp and add the following configuration to .vimrc:

if executable('bash-language-server') au User lsp_setup call lsp#register_server({ \ 'name': 'ags-script-language-server', \ 'cmd': {server_info->[&shell, &shellcmdflag, 'ags-script-language-server start']}, \ 'whitelist': ['sh'], \ }) endif

For Vim 8 or Neovim using neoclide/coc.nvim, according to it's Wiki article, add the following to your coc-settings.json:

 "languageserver": { "bash": { "command": "ags-script-language-server", "args": ["start"], "filetypes": ["sh"], "ignoredRootPaths": ["~"] } }

For Vim 8 or NeoVim using w0rp/ale add the following configuration to your .vimrc:

let g:ale_linters = { \ 'sh': ['language_server'], \ }

Neovim

Install the plugin autozimu/LanguageClient-neovim and add the following configuration to init.vim:

let g:LanguageClient_serverCommands = { \ 'sh': ['ags-script-language-server', 'start'] \ }

Oni

On the config file (File -> Preferences -> Edit Oni config) add the following configuration:

"language.agsscript.languageServer.command": "ags-script-language-server", "language.agsscript.languageServer.arguments": ["start"],

Emacs

Lsp-mode has a built-in client, can be installed by use-package. Add the configuration to your .emacs.d/init.el

(use-package lsp-mode :commands lsp :hook (sh-mode . lsp))

Development Guide

Please see docs/development-guide for more information.

About

A language server for AGS Script - Warning: Work In Progress

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 88.0%
  • Shell 9.4%
  • JavaScript 2.3%
  • Other 0.3%