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

Implement a .lua configuration #2961

Closed
jacopoaltieri opened this issue May 29, 2024 · 3 comments
Closed

Implement a .lua configuration #2961

jacopoaltieri opened this issue May 29, 2024 · 3 comments

Comments

@jacopoaltieri
Copy link

Request: Implementing a .lua configuration for vimtex

Most of the actual confiugrations in neovim are done via Lazy, using a .lua plugin filesystem. However, the readme.MD does not provide any information on how to "translate" the init.vim into an init.lua file.

Possible solution

Add a section in the readme.MD with a minimal reproducible example of a lua configuration (being it a single- or a multi-file one)

@lervag
Copy link
Owner

lervag commented Jun 1, 2024

Could you explain what is lacking in this example?

vimtex/README.md

Lines 63 to 70 in 9665df7

{
"lervag/vimtex",
lazy = false, -- we don't want to lazy load VimTeX
-- tag = "v2.15", -- uncomment to pin to a specific release
init = function()
-- VimTeX configuration goes here
end
}

@jacopoaltieri
Copy link
Author

I might be wrong (neovim/lua newbie here), but pasting some lines from the "configuration" part of the script (e.g. "syntax enable or let g:vimtex_view_method = 'zathura') will get an error.
I managed to work around it using the "vim.g.vimtex_view_method" formatting, but I had to search for it thoroughly. So even a simple one-line example would be beneficial for the newcomers out there

Btw you can consider the issue closed if needed, and keep up the amazing work!

lervag added a commit that referenced this issue Jun 1, 2024
@lervag
Copy link
Owner

lervag commented Jun 1, 2024

I might be wrong (neovim/lua newbie here), but pasting some lines from the "configuration" part of the script (e.g. "syntax enable or let g:vimtex_view_method = 'zathura') will get an error.

Ah, yes. Well, I understand that a lot of these things may feel hard or difficult to understand for newbies. I've tried to update the README slightly to make it clearer, and I've suggested a useful and relevant section of the Neovim docs for those who want to configure with Lua.

I hope you find this to be an improvement, and if not, it would be nice if you could help me improve it.

Btw you can consider the issue closed if needed, and keep up the amazing work!

Thanks for the kind words! I'll close the issue as solved with my latest update, but feel free to suggest further improvements.

@lervag lervag closed this as completed Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants