# What is your Nextflow emacs setup?

**URL:** <https://community.seqera.io/t/what-is-your-nextflow-emacs-setup/848>\
**Category:** Ask for help\
**Created:** [June 14, 2024, 9:56am UTC](https://community.seqera.io/t/what-is-your-nextflow-emacs-setup/848 "2024-06-14T09:56:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![adabnz](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/adabnz/32/365_2.png) [@adabnz](https://community.seqera.io/u/adabnz)\
**Post date:** [June 14, 2024, 9:56am UTC](https://community.seqera.io/t/what-is-your-nextflow-emacs-setup/848/1 "2024-06-14T09:56:41Z")

</div>

Hi all,

I’m interested to hear how people are writing Nextflow code in emacs?

I have set up the emacs nextflow mode, but the syntax highlighting is somewhat wonky and I’m not sure it is still developed. Also it would be really nice to have some kind of interactive mode, but I’m not sure it is even possible to support that in emacs because of the way it has been implemented in Nextflow.

Would love to hear peoples experience!

---

<div class="post-metadata">

**Author:** ![ewels](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/ewels/32/1_2.png) [@ewels](https://community.seqera.io/u/ewels)\
**Post date:** [June 14, 2024, 12:33pm UTC](https://community.seqera.io/t/what-is-your-nextflow-emacs-setup/848/2 "2024-06-14T12:33:59Z")

</div>

Not an emacs user myself, but I know that @emiller is. He wrote some notes with links to helpful packages which may be helpful:

> **[Docs: Code editor plugins](https://nf-co.re/docs/contributing/code_editors_and_styling/editor_plugins#emacs)**
>
> Additions to your coding environment that can help your workflow.

Phil

---

<div class="post-metadata">

**Author:** ![emiller](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/emiller/32/79_2.png) [@emiller](https://community.seqera.io/u/emiller)\
**Post date:** [June 14, 2024, 5:36pm UTC](https://community.seqera.io/t/what-is-your-nextflow-emacs-setup/848/3 "2024-06-14T17:36:01Z")

</div>

Hey!

## nextflow-mode

Author of [nextflow-mode](https://github.com/edmundmiller/nextflow-mode) here.

Actively used by myself most days. Agreed that the syntax highlighting is wonky 😬

I’ve been meaning to rewrite some basic Tree-sitter support for Nextflow which would be a better effort on the syntax highlighting. Looks like there’s been some effort with [GitHub - matthuska/tree-sitter-nextflow: Tree sitter parser for nextflow](https://github.com/matthuska/tree-sitter-nextflow)!

Tree-sitter is definitely the direction neovim/Emacs/Zed are moving in and rightly so. I just can’t find the motivation to try to get bash script syntax highlighting in Nextflow script directives with elisp. 🫠

In terms of interactivity, I’ve seen that snakemake-mode has some of those features, but I haven’t played around with them. Thought about doing some of it for Nextflow, but I always find this code launching bits in Emacs to be flakey.

## My Emacs Nextflow Workflow

Decided to just make a [quick blog-post](https://edmundmiller.dev/posts/emacs-nextflow/) since I’ve talked about this enough with David Gemperline and others.

---

<div class="post-metadata">

**Author:** ![emiller](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/emiller/32/79_2.png) [@emiller](https://community.seqera.io/u/emiller)\
**Post date:** [November 8, 2024, 4:30pm UTC](https://community.seqera.io/t/what-is-your-nextflow-emacs-setup/848/4 "2024-11-08T16:30:08Z")

</div>

Think this should go here:

> **[Nextflow - LSP Mode - LSP support for Emacs](https://emacs-lsp.github.io/lsp-mode/page/lsp-nextflow/)**
>
> Language Server Protocol Support for Emacs

The LSP is now supported. Huge improvement for free.
