georgeguimaraes
Grammar/style check and markdown linter for code documentation in Neovim
Another cool plugin for Neovim, GitHub - jmbuhr/otter.nvim: Just ask an otter! 🦦 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.
Most Liked
georgeguimaraes
I forgot to mention that using ltex-ls means we’re using the awesome toolkit from https://languagetool.org/
1
Popular in Guides/Tuts
Hey guys I’ve made a guide on how to connect Quill to Phoenix.
For the sake of formatting it might be easier to view it on my Notion Doc...
New
I thought I’d share a small project I’m working on to gain some familiarty with LiveView in a Phoenix app.
Github Repo
Deployment
It’s...
New
Greetings: I just wrote a step-by-step guide on building a Phoenix 1.3 JWT Auth API with Guardian JWTs and Comeonin password hashing.
I ...
New
So I’m really loving elixir. BY FAR the most excruciating piece of learning a functional language for me is having to “transform” all my ...
New
Some advice for Elixir programmers.
I was reviewing someone's Elixir Code yesterday and found a deadlock condition bug in a GenServer i...
New
A question I had when first learning contexts and Ecto was how to expand the default context API to support more flexible queries. Usuall...
New
Hello dear alchemists,
There was this question some days ago here about the deployment to a VPS.
As I was in the process of deploying t...
New
I'm writing up this quick "How to" because what I thought was going to be an easy implementation of a Plug to validate a webhook request ...
New
Hey, today I give amnesia library a try and found a few problems. I would like describe how to setup it properly and solve problems which...
New
Hey all,
With Phoenix 1.6 just around the corner, I figured I’d make a tutorial on how to add Bulma to a new Phoenix 1.6 project. By lev...
New
Other popular topics
Update:
How to use the Blogs & Podcasts section
You can post links to your blog posts or podcasts either in one of the Official Blog...
New
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
Good day to you all.
I have been struggling to get a query involving like and ilike to work.
Can anyone assist me on this, please?
pro...
New
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode.
The solution seems to be, in a hyphena...
New
I have an umbrella app.
Some of the apps inside depend on other apps in the umbrella, unsurprisingly.
I'm writing a test for one of t...
New
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service.
Currently when I de...
New
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible.
total = 10
while total != 0
...
New
Hi all,
I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage.
I'm trying to use Postg...
New
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New








