bash-language-server

A language server for Bash
授权协议 MIT License
开发语言 SHELL
所属分类 应用工具、 终端/远程登录
软件类型 开源软件
地区 不详
投 递 者 宓季同
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Bash Language Server

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

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 bash-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': 'bash-language-server',
        \ 'cmd': {server_info->[&shell, &shellcmdflag, 'bash-language-server start']},
        \ 'allowlist': ['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": "bash-language-server",
      "args": ["start"],
      "filetypes": ["sh"],
      "ignoredRootPaths": ["~"]
    }
  }

For Vim 8 or NeoVim using dense-analysis/ale add the followingconfiguration to your .vimrc:

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

Neovim

For NeoVim using autozimu/LanguageClient-neovim, add the following configuration toinit.vim:

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

For NeoVim v0.5(nightly) using its built-in lsp, install neovim/nvim-lspconfig and add the following configuration to either your init.vim or init.lua

init.vim:

lua require'lspconfig'.bashls.setup{}

or

init.lua:

require'lspconfig'.bashls.setup{}

Oni

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

"language.bash.languageServer.command": "bash-language-server",
"language.bash.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.

  • 在用vscode编写vue代码时,因为安装的有vetur插件,所以当代码中有v-for语法时,会提示 [vue-language-server] ‘v-for’ directives require ‘v-bind:key’ directives. 解决方法:在配置文件添加一句: "vetur.validation.template": false

  • bash 可以直接运行 .sh文件。 如安装 anaconda: bash Anaconda3-5.3.0-Linux-x86_64.sh .sh 是UNIX/LINUX操作系统的脚本文件(命令组合),SHELL。源自自由操作系统计划,GNU。你肯定没见过递归的英文简写,就像递归数学公式一样: GNU's Not Unix! shell命令缩写 bin = BINaries  /dev = DEV

  • 问题描述 [coc.nvim] Server bash failed to start: Command “bash-language-server” of languageserver.bash is not executable: Error: not found: bash-language-server 解决方法 npm i -g bash-language-server

  • 1.首先在VS code上安装morden fortran和Fortranintellisence 2.然后在电脑的windows命令提示窗口输入 pip install fortran-language-server 亲测有效

 相关资料
  • Move is a new programming language developed to provide a safe and programmable foundation for the Libra Blockchain. Organization The Move language directory consists of five parts: The virtual machin

  • Content-Language 实体头用于描述旨在为观众的语言(S),使得其允许用户根据用户自己的优选语言区分。 例如,如果Content-Language: de-DE设置了“ ”,它表示该文件是用于德语的人(但是,它并不表示该文件是用德语写的,例如,它可能是用英语写成的,作为语言课程的一部分为德语人士)。 如果Content-Language未指定,则默认情况下内容适用于所有语言受众。多语言

  • Accept-Language请求的 HTTP 标头通告哪些语言客户端是能够理解,并且其区域的变体是优选的。使用内容协商,服务器然后选择其中一个提议,使用它并通过Content-Language响应头通知客户它的选择。浏览器根据它们的用户界面语言为该标题设置足够的值,并且即使用户可以改变它,这也很少发生(并且因为它导致指纹)而被忽视。 当服务器无法通过另一种方式确定语言时,使用此标题是一种暗示,例

  • Io语言是一门简单小巧采用原型编程范式的弱类型动态语言。虚拟机只有10K左右。初次遇见Io,你一定会惊叹于它的简洁。从Io官网就可以看出来,作者Steve Dekorte是个极度崇尚简洁的人。 io作为一门原型语言,其对象关系模型也十分清晰。使用protos就可以查看某一个对象(需要为带有type槽的对象)的原型列表。某一个对象在收到消息时会查找自己的是否含有相应的消息槽,如果有就直接响应,如果没

  • language-babel Language grammar for all versions of JavaScript including ES2016 and ESNext, JSX syntax as used by Facebook React, Atom's etch and others, as well as optional typed JavaScript using Fac

  • 微软最近开源了P语言,致力于在Linux、macOS和Windows上编写安全的异步事件驱动程序。 微软将P描述为一种领域特定语言,对异步系统的组件间通信进行建模,例如嵌入式、网络或分布式系统。P程序是通过有限状态机(finite state machine)来定义的,这些状态机会并发运行。每个状态机都有一个输入队列、状态、转换、机器本地存储,并且可以发送异步信息给其他状态机。在P中的基本操作要么