Skip to content

Editor Setup

tazz edited this page Sep 11, 2026 · 2 revisions

taskfile-lsp implements the Language Server Protocol (LSP) and can be used with editors that support LSP.


Before configuring your editor, make sure taskfile-lsp is installed and available in your $PATH:

taskfile-lsp version

Or using which:

which taskfile-lsp

See the Install Guide if you haven't installed it yet.


Editor Status Configuration
Neovim Supported See below
VS Code Planned
Zed Planned

Neovim

Requires Neovim 0.11+

vim.lsp.config('taskfile', {
  cmd = { 'taskfile-lsp' },
  filetypes = { 'yaml.taskfile', 'taskfile' },
  root_markers = { 'Taskfile.yaml', 'Taskfile.yml' },
})

vim.lsp.enable('taskfile')

Once enabled, opening a supported Taskfile filetype starts the language server.

Filetype detection

taskfile-lsp supports the following Neovim filetypes:

  • taskfile
  • yaml.taskfile

If your editor configuration doesn't detect Taskfiles automatically, you can either:

  • Install the taskfile.nvim plugin which provides automatic Taskfile filetype detection and enhanced taskfile-lsp and task support
  • Add the filetype using the Neovim API:
vim.filetype.add({
  filename = {
    ['Taskfile.yaml'] = 'yaml.taskfile',
    ['Taskfile.yml'] = 'yaml.taskfile',
  },
})
  • Add the filetype marker to the top of your Taskfile:
# Taskfile.yaml
# v​im: set filetype=yaml.taskfile:
---
...

Using nvim-lspconfig

Support for nvim-lspconfig is coming soon.

Clone this wiki locally