Skip to content

carn181/faustlsp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

faustlsp

A LSP Server for the Faust programming language.

Installation

To install, run

go get github.com/carn181/faustlsp@latest

This will install a faustlsp executable in $HOME/go/bin by default.

Alternatively, you can clone this repository, build and install faustlsp.

git clone https://github.com/carn181/faustlsp
cd faustlsp
go build
go install

For code formatting, install faustfmt following install instructions in the project's README.

Usage

VS Code

vscode-faust is a VS Code extension for Faust that works with faustlsp. Follow installation steps in the README.md

Neovim

Sample nvim-lspconfig configuration which requires a .faustcfg.json in the faust project root directory:

vim.lsp.config('faustlsp', {
    cmd = { 'faustlsp' },
    filetypes = {'faust'},
	workspace_required = true,
	root_markers = { '.faustcfg.json' }
})

Emacs

Sample lsp-mode server config

(lsp-register-client
   (make-lsp-client
    :new-connection (lsp-stdio-connection "faustlsp")
    :activation-fn (lsp-activate-on "faust")
    :server-id 'faustlsp
    ))

Features

  • Document Synchronization
  • Diagnostics
    • Syntax Errors
    • Compiler Errors (can disable in .faustcfg.json as they look ugly due to compiler limitations)
  • Hover Documentation
  • Code Completion
  • Document Symbols
  • Formatting (using faustfmt)
  • Goto Definition
  • Find References

Configuration

You can configure the LSP server and it give it information about the project using a .faustcfg.json file defined in a project's root directory.
Configuration Options:

{
  "command": "faust",              // Faust Compiler Executable to use
  "process_name": "process",       // Process Name passed as -pn to compiler
  "process_files": ["a.dsp"],      // Files that have top-level processes defined
  "compiler_diagnostics": true     // Show Compiler Errors 
}

About

A LSP Server Implementation for Faust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •