🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

beancount-lsp-server

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

beancount-lsp-server

Language server for Beancount files with customizable tree-sitter WASM file path

latest
npmnpm
Version
0.0.5
Version published
Weekly downloads
1
-90.91%
Maintainers
1
Weekly downloads
 
Created
Source

Beancount LSP Server

A Language Server Protocol (LSP) implementation for Beancount using by beancount-lsp extension

Overview

The Beancount LSP Server provides intelligent features for Beancount files, including diagnostics, completions, hover information, and navigation capabilities etc...

npx beancount-lsp-server

Usage

The LSP server can be used programmatically in your JavaScript/TypeScript application or as a standalone process.

Programmatic Usage

import { BeancountLSPServer } from 'beancount-lsp-server';
import { createConnection, ProposedFeatures } from 'vscode-languageserver/node';

// Create a connection to the client
const connection = createConnection(ProposedFeatures.all);

// Create the Beancount LSP server
const server = new BeancountLSPServer({
	connection,
	// Additional initialization options
});

// Start the server
server.start();

Initialization Parameters

When initializing the Beancount LSP server, you can provide the following parameters:

Required Parameters

  • connection: The LSP connection created from vscode-languageserver.

Optional Parameters

  • extensionUri: URI string for the extension's location. which contain pythonFiles directory and python files needed

Server Configuration

Clients can configure the server by providing initialization options when creating the language client:

// Connect to the server
const client = new LanguageClient(
	'beancountLanguageServer',
	'Beancount Language Server',
	{
		run: {
			module: 'beancount-lsp-server',
			transport: TransportKind.ipc,
		},
		debug: {
			module: 'beancount-lsp-server',
			transport: TransportKind.ipc,
			options: {
				execArgv: ['--nolazy', '--inspect=6009'],
			},
		},
	},
	{
		documentSelector: [{ scheme: 'file', language: 'beancount' }],
		synchronize: {
			fileEvents: workspace.createFileSystemWatcher('**/*.bean'),
		},
		initializationOptions: {
			extensionUri: extensionUri.toString(),
		},
	},
);

// Start the client
client.start();

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT

FAQs

Package last updated on 01 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts