mhartington/formatter.nvim

Feature Request: A function for showing what formatter is attached to the current buffer

mesa123123 opened this issue · 3 comments

I know in the lsp client there is a function that allows me to see what lsp server is attached to the current session, it would be cool to have one that would show the current formatter attached to the current client as well:

I want to use this for my lualine config:
image
You can see the pyright server there so I'd like it to say "black" or "autopep8" as well

Is this something you can already do?

If its not it'd be cool to add it in!

You can sort of get those details and display them in your lualine - an example of what i did.

image

See code in #263

also:

local formatters = require("formatter.util").get_available_formatters_for_ft(vim.bo.filetype)

Cheers guys thanks for the tips!