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

Use ft=dockerfile? (lowercase) #67

Open
blueyed opened this issue Jul 17, 2020 · 4 comments
Open

Use ft=dockerfile? (lowercase) #67

blueyed opened this issue Jul 17, 2020 · 4 comments

Comments

@blueyed
Copy link

blueyed commented Jul 17, 2020

Vim itself uses filetype=dockerfile, whereas Dockerfile is used here.
Is there a specific reason for this? I think it should/could use the default filetype here also.

(Via neomake/neomake#2498)

@ekalinin
Copy link
Owner

Hm, I believe there's no particular reason for than except the historical one.

@carand
Copy link

carand commented Apr 4, 2021

The reason for change that to the original vim behavior is that other plugins, which working on this filetype doesn't work without additional fixes in the vimrc.
Original behavior: au BufNewFile,BufRead Containerfile,Dockerfile,*.Dockerfile setf dockerfile
Current example for that is 'ycm-core/lsp-examples' which uses the original behavior.

Best regards

carand added a commit to carand/Dockerfile.vim that referenced this issue Apr 4, 2021
carand added a commit to carand/Dockerfile.vim that referenced this issue Apr 4, 2021
strayer added a commit to strayer/null-ls.nvim that referenced this issue Oct 21, 2021
ekalinin/Dockerfile.vim uses Dockerfile as a filetype, causing hadolint
not to be activated when editing Dockerfile files. nvim-lspconfig also
uses both filetypes for activating dockerls, so I think it makes sense
to have them both for hadolint too until this is eventually changed in
Dockerfile.vim. (see linked issue)

See:
https://github.com/neovim/nvim-lspconfig/blob/cd1ccf0/lua/lspconfig/dockerls.lua#L10
ekalinin/Dockerfile.vim#67
strayer added a commit to strayer/null-ls.nvim that referenced this issue Oct 21, 2021
ekalinin/Dockerfile.vim uses Dockerfile as a filetype, causing hadolint
not to be activated when editing Dockerfile files. nvim-lspconfig also
uses both filetypes for activating dockerls, so I think it makes sense
to have them both for hadolint too until this is eventually changed in
Dockerfile.vim. (see linked issue)

See:
https://github.com/neovim/nvim-lspconfig/blob/cd1ccf0/lua/lspconfig/dockerls.lua#L10
ekalinin/Dockerfile.vim#67
@EdmundsEcho
Copy link

EdmundsEcho commented Jul 11, 2023

Only as an FYI, not knowing the best way to proceed, however, the filetype Dockerfile prevented the docker tree-sitter to work as expected. It threw a "symbol not recognized error". Here is the link to that issue. Manually overriding the autocmd in this plugin to rename the filetype to dockerfile fixed the issue. Perhaps some of the features in the plugin are inherently incompatible with tree-sitter?

@mmerickel
Copy link

Just ran into this issue as well. :-( It is breaking tree_sitter which is trying to load a compiled library called tree_sitter_<filetype> and running into casing issues as it expects tree_sitter_dockerfile.

The workaround for me is to override treesitter as follows:

vim.treesitter.language.register("dockerfile", "Dockerfile")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants