Skip to content

bug: can't attach formatter to yaml.ansible filetype #679

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 tasks done
sarmong opened this issue Mar 28, 2025 · 1 comment
Closed
2 tasks done

bug: can't attach formatter to yaml.ansible filetype #679

sarmong opened this issue Mar 28, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@sarmong
Copy link

sarmong commented Mar 28, 2025

Neovim version (nvim -v)

v0.11.0

Operating system/version

Linux

Read debugging tips

Add the debug logs

  • I have set log_level = vim.log.levels.DEBUG and pasted the log contents below.

Log file

Describe the bug

This line for some reason splits the filetype. So yaml.ansible filetype cannot be matched.

local filetypes = vim.split(vim.bo[bufnr].filetype, ".", { plain = true })

What is the severity of this bug?

breaking (some functionality is broken)

Steps To Reproduce

Expected Behavior

Minimal example file

No response

Minimal init.lua

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "--single-branch",
    "https://github.com/folke/lazy.nvim.git",
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  {
    "stevearc/conform.nvim",
    config = function()
      require("conform").setup({
        log_level = vim.log.levels.DEBUG,
        -- add your config here
      })
    end,
  },
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

Additional context

No response

@sarmong sarmong added the bug Something isn't working label Mar 28, 2025
@stevearc
Copy link
Owner

Should be fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants