georgeguimaraes

georgeguimaraes

Another cool plugin for Neovim, GitHub - jmbuhr/otter.nvim: Just ask an otter! 🦦 · GitHub makes it possible to run linters for embedded code, like Markdown in code documentation:

In order to make it happen, you need to install otter (example for lazy.vim):

{
    "jmbuhr/otter.nvim",
    dependencies = {
      "hrsh7th/nvim-cmp",
      "neovim/nvim-lspconfig",
      "nvim-treesitter/nvim-treesitter",
    },
    opts = {
      buffers = {
        set_filetype = true,
      },
    },
  }

You also need to activate Otter in Elixir files:

local group = vim.api.nvim_create_augroup("Elixir", { clear = true })
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
  pattern = "*.ex,*.exs",
  group = group,
  callback = function()
    local ok, otter = pcall(require, "otter")
    if ok then
      otter.activate({ "markdown" })
    end
  end,
})

Then I installed ltex-ls and vale-ls via :Mason.

Vale also needs a config in the project or in ~/.vale.ini:

StylesPath = styles

MinAlertLevel = suggestion

Packages = proselint, write-good, alex, Joblint

[*]
BasedOnStyles = Vale, proselint, write-good, alex, Joblint

Then vale sync and you’re ready to go.

Now your Neovim will be able to help with grammar and style guide for English not only in Markdown files, but also in Markdown embedded into Elixir files.

Showing Posts 1 to 1

georgeguimaraes

georgeguimaraes OP

I forgot to mention that using ltex-ls means we’re using the awesome toolkit from https://languagetool.org/

— All posts loaded —

Where Next? Top

Trending in Guides/Tuts Top

c4lliope
# ~/src/livebook/.iex.exs System.cmd("xdg-open", [ LivebookWeb.Endpoint.access_url() ] ) Because Livebook requires a unique passcode on ...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews