Skip to content
This repository was archived by the owner on May 6, 2024. It is now read-only.
This repository was archived by the owner on May 6, 2024. It is now read-only.

Filetype does not detect dot files. #94

Open

Description

@sandeep-ad

While opening dot file I get following error message.

Error detected while processing BufReadPost Autocommands for "":
E5108: Error executing lua vim/_editor.lua:0: BufReadPost Autocommands for "
"..script nvim_exec2() called at BufReadPost Autocommands for "*":0: Vim(call):E1
17: Unknown function: dist#ft#CSH
stack traceback:
[C]: in function 'nvim_exec2'
vim/_editor.lua: in function 'cmd'
...r/start/filetype.nvim/lua/filetype/mappings/function.lua:525: in function 'name'
...te/pack/packer/start/filetype.nvim/lua/filetype/init.lua:17: in function 'set_filetype'
...te/pack/packer/start/filetype.nvim/lua/filetype/init.lua:65: in function 'try_lookup'
...te/pack/packer/start/filetype.nvim/lua/filetype/init.lua:171: in function 'resolve'
[string ":lua"]:1: in main chunk

Activity

  1. Carltoffel commented on Apr 13, 2023

    @Carltoffel

    I have the same issue. Some file types work, others don't.
    File types that don't work are, e.g.:

    • c (dist#ft#FTlpc)
    • html (dist#ft#FThtml)
    • sh (dist#ft#SetFileTypeSH)
  2. jpfender commented on Apr 26, 2023

    @jpfender

    I am also facing this issue (with sh files). Was anyone able to find the cause?

  3. Carltoffel commented on Apr 26, 2023

    @Carltoffel

    Uninstall the plugin. ¯\(ツ)/¯
    From what I can tell, it's not needed in newer versions of vim/neovim any more.
    Maybe someone can confirm?

  4. jpfender commented on Apr 27, 2023

    @jpfender

    Uninstall the plugin. ¯_(ツ)_/¯ From what I can tell, it's not needed in newer versions of vim/neovim any more. Maybe someone can confirm?

    This is indeed the right solution for this issue. Uninstall filetype.nvim and set vim.opt.filetype = "on" in your config.

  5. sandeep-ad commented on May 2, 2023

    @sandeep-ad
    Author

    I uninstalled the plugin and added filetype=on, now the behaviour is when I open the main.tf it does not show syntax highlighting. But when I do telecope search of the file and open it it shows all the nice highlighting etc. here are two different screen shots.
    image
    image

  6. gpanders commented on Jul 12, 2023

    @gpanders
    Contributor

    You do not need vim.opt.filetype = "on". It is enabled by default.

    If you are using Neovim 0.8 or later you do not need to do anything to enable Lua based filetype detection. It is all enabled by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions