Skip to main content

Makefile language server

Project description

make-ls

CI PyPI Python License

make-ls is a Makefile language server written in Python.

It uses an owned Make parser and checks recipe shell syntax with bash -n.

Features

  • hover, go-to-definition, and references for targets and variables
  • variable rename
  • quick fixes for unknown variables that add an empty assignment
  • quick fixes for unresolved prerequisites that create a target stub recipe
  • check subcommand for batch diagnostics
  • hover for common GNU Make directives, functions, builtin variables, and special targets
  • diagnostics for Makefile syntax
  • diagnostics for unresolved plain prerequisites
  • diagnostics for shell syntax inside recipes
  • target lookup through explicit include, -include, and sinclude directives

Limits

  • no full GNU Make evaluation
  • include resolution is still limited
  • no completion yet

Install

uv tool install make-ls

Run

make-ls

In stdio LSP mode this writes logs to $XDG_STATE_HOME/make-ls/, or ~/.local/state/make-ls/ when XDG_STATE_HOME is unset. The default file name is a stable hash derived from the launch directory.

To override the log path:

make-ls --log-file /tmp/make-ls.log --log-level debug

To disable file logging entirely:

make-ls --no-log-file

Lint files or directories:

make-ls check Makefile rules.mk
make-ls check .
make-ls check --format json . > make-ls.sarif

For local development:

uv sync --all-groups
uv run make-ls

Neovim

vim.lsp.config('make-ls', {
  cmd = { 'make-ls' },
  filetypes = { 'make' },
  root_markers = { 'Makefile' },
})

vim.lsp.enable("make-ls")

With the default cmd = { 'make-ls' }, Neovim LSP logs land in a launch-path specific file under the XDG state log directory.

Development

make check
make test
make build

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

make_ls-0.4.0.tar.gz (34.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

make_ls-0.4.0-py3-none-any.whl (39.0 kB view details)

Uploaded Python 3

File details

Details for the file make_ls-0.4.0.tar.gz.

File metadata

  • Download URL: make_ls-0.4.0.tar.gz
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for make_ls-0.4.0.tar.gz
Algorithm Hash digest
SHA256 80b2cecf78dcdb3872e243bc26f4516a020a04bcdbdd36ba11bf426dbba65992
MD5 c89bcb036afb225a709a41dacfa9eca4
BLAKE2b-256 c053f8c7151ef3c8e68e9fd9247cc9810503ac94b37e150aeca28256fc98aeb5

See more details on using hashes here.

Provenance

The following attestation bundles were made for make_ls-0.4.0.tar.gz:

Publisher: releases.yml on lewis6991/make-ls

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file make_ls-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: make_ls-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 39.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for make_ls-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c374b568c17100e8d417c68a3bcab6cae10529f67df27820d1c6df6f8ba00ac
MD5 b26f39b8f909da20628f33a3d1b7fd6c
BLAKE2b-256 c5096b5e2bb9cd08d068727d208487dec95fc443cc595c2abb6a225f51a0f36c

See more details on using hashes here.

Provenance

The following attestation bundles were made for make_ls-0.4.0-py3-none-any.whl:

Publisher: releases.yml on lewis6991/make-ls

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page