Metadata-Version: 2.3
Name: make-ls
Version: 0.3.0
Summary: Makefile language server
Author: Lewis Russell
Author-email: Lewis Russell <lewis6991@gmail.com>
License: MIT License
         
         Copyright (c) 2026 Lewis Russell
         
         Permission is hereby granted, free of charge, to any person obtaining a copy
         of this software and associated documentation files (the "Software"), to deal
         in the Software without restriction, including without limitation the rights
         to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         copies of the Software, and to permit persons to whom the Software is
         furnished to do so, subject to the following conditions:
         
         The above copyright notice and this permission notice shall be included in all
         copies or substantial portions of the Software.
         
         THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
         SOFTWARE.
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: lsprotocol>=2025.0.0
Requires-Dist: pygls>=2.1.1
Requires-Python: >=3.12
Description-Content-Type: text/markdown

# make-ls

[![CI](https://github.com/lewis6991/makels/actions/workflows/ci.yml/badge.svg)](https://github.com/lewis6991/makels/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/make-ls)](https://pypi.org/project/make-ls/)
[![Python](https://img.shields.io/pypi/pyversions/make-ls)](https://pypi.org/project/make-ls/)
[![License](https://img.shields.io/github/license/lewis6991/makels)](LICENSE)

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

It is still early, but it is already useful for real Makefiles. The server uses
an owned line-based Make parser and checks recipe shell syntax with `bash -n`.

## What it does

- hover for targets and variables
- hover for common GNU Make directives, functions, builtin variables, and special targets
- go-to-definition for targets and variables
- find references for targets and variables
- rename for variables
- diagnostics for Makefile syntax
- diagnostics for shell syntax inside recipes
- target lookup through explicit `include`, `-include`, and `sinclude` directives

## What it does not do yet

- full GNU Make evaluation
- complete include-path expansion and evaluation
- completion or code actions

## Run it

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

Any editor that can start a stdio LSP can use it.

## Neovim

```lua
vim.lsp.config("make-ls", {
  cmd = { "uv", "run", "--directory", "/path/to/make-ls", "make-ls" },
  filetypes = { "make" },
  root_markers = { "Makefile", "makefile", "GNUmakefile", ".git" },
})

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

## Development

```sh
make check
make test
make build
```

## Release

Stable releases from `.github/workflows/releases.yml` publish GitHub assets and
upload the tagged distribution to PyPI with trusted publishing. Configure PyPI
to trust `.github/workflows/releases.yml` and, if you keep it, the `pypi`
environment.
