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

Problem with commenting /etc/pacman.conf #90

Closed
roland-5 opened this issue Dec 8, 2021 · 4 comments
Closed

Problem with commenting /etc/pacman.conf #90

roland-5 opened this issue Dec 8, 2021 · 4 comments
Labels
question Question related to integration and other stuff

Comments

@roland-5
Copy link

roland-5 commented Dec 8, 2021

Hi,

I have little strange problem. I use Arch Linux, and there is /etc/pacman.conf where you configure option for Arch package manager.
If I do this with

sudo nvim /etc/pacman.conf

or as root

nvim /etc/pacman.conf

And I do gcc it add at start of line ; , like from

#NoUpgrade   =

to

; #NoUpgrade   =

But if I do this with command

sudoedit /etc/pacman.conf

It commenting and uncommenting without problem.
I even nuked my init.lua config to just

-- load plugin manager first
require('plugins._packer')

To be sure, that nothing from my neovim config interrupt with Comment.nvim, but without success.

@numToStr
Copy link
Owner

numToStr commented Dec 8, 2021

By default pacman.conf is detected as dosini filetype and commentstring is set to ;. So you need to change the filetype to conf then you won't face any issues.

@numToStr
Copy link
Owner

numToStr commented Dec 8, 2021

Add the following to your neovim config

aucmd BufNewFile,BufRead *.conf set ft=conf

@numToStr numToStr added the question Question related to integration and other stuff label Dec 8, 2021
@numToStr
Copy link
Owner

numToStr commented Dec 8, 2021

I am going to close as this is not related to this plugin :)

@numToStr numToStr closed this as completed Dec 8, 2021
@roland-5
Copy link
Author

roland-5 commented Dec 8, 2021

Add the following to your neovim config

aucmd BufNewFile,BufRead *.conf set ft=conf

I very appreciate for your fast answer. It didn't work, but I changed it to

vim.cmd([[
    autocmd BufNewFile,BufRead *.conf set ft=conf
]])

I'm not sure if it is correct, but it worked flawlessly. Very much love. <3 Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question related to integration and other stuff
Projects
None yet
Development

No branches or pull requests

2 participants