Skip to content
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

Filetype detection not enabled after adding use() in packer.nvim #937

Closed
2 tasks done
alerque opened this issue Jun 8, 2023 · 4 comments
Closed
2 tasks done

Filetype detection not enabled after adding use() in packer.nvim #937

alerque opened this issue Jun 8, 2023 · 4 comments
Labels
bug Issues related to bugs. Please attach a severity, a priority and category with this label.

Comments

@alerque
Copy link

alerque commented Jun 8, 2023

Prerequisites

  • I am using the latest stable release of Neovim
  • I am using the latest version of the plugin

Neovim Version

NVIM v0.9.1

Neorg setup

require("neorg").setup {
  load = {
    ["core.defaults"] = {},
    ["core.completion"] = {
      config = {
        engine = "nvim-cmp",
      },
    },
    ["core.concealer"] = {},
    ["core.dirman"] = {
      config = {
        workspaces = {
          notes = "~/notes",
        },
      },
    },
    ["core.integrations.telescope"] = {},
  },
}

Actual behavior

Opening a Neorg file results in no filetype being set, :set ft shows ft=.

Expected behavior

After opening a Neorg file (extension *.norg) I would expect ft=norg. This should come with syntax and bindings enabled.

Steps to reproduce

Open a file, either directly through nvim index.norg or via the internal :Neorg index command.

Potentially conflicting plugins

No response

Other information

The complete configuration I used to get started using packer.nvim cam be seen here: alerque/que-vim@e8d8825.

I've run :Neorg sync-parsers and :TSUpdate and others to no avail.

After loading a Neorg file if I manually set the filetype via :set ft=norg then suddenly syntax is enabled and things start working.

Even before manually setting the filetype, the :Neorg command is available, so the plugin loaded, just not the filetype detection bit.

I've tried using lazy loading by adding ft = "norg" to the packer.nvim use {} table, but to no avail.

Help

No

Implementation help

No response

@alerque alerque added the bug Issues related to bugs. Please attach a severity, a priority and category with this label. label Jun 8, 2023
@alerque alerque changed the title Filetype detection not enabled Filetype detection not enabled after adding use() in packer.nvim Jun 8, 2023
@max397574
Copy link
Contributor

could you show your packer use statement?

@alerque
Copy link
Author

alerque commented Jun 8, 2023

I already linked to the full packer use statement exactly as used here: alerque/que-vim@e8d8825

@phenax
Copy link

phenax commented Jul 7, 2023

Got the same issue after a :PackerUpdate. Any news on this?

I'm setting the filetype manually for now -

  vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
    pattern = { "*.norg" },
    callback = function()
      vim.opt.ft = 'norg'
    end,
  })

@vhyrro
Copy link
Member

vhyrro commented Jun 11, 2024

Since 0.10.0 Neorg is recognized as a native filetype, therefore any issues related to this should since be gone! :)

@vhyrro vhyrro closed this as completed Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues related to bugs. Please attach a severity, a priority and category with this label.
Projects
None yet
Development

No branches or pull requests

4 participants