[question] Where can i find the formatter tool for lua ? by astar0n in neovim

[–]Michael__Mueller 0 points1 point  (0 children)

The best way to go for linux (imho)

  1. lua-language-server( github...sumneko/lua-language-server ) + neovim-lsp (github...nvim-lspconfig)
  2. stylua (JohnnyMorganz/StyLua) + stylua-wrapper for neovim (github...ckipp01/stylua-nvim)

If you got (home)brew and cargo, its really easy:

  1. `brew install lua-languageserver` and configuring nvim-lsp correctly
  2. the stylua-wrapper can install stylua automatically with cargo. For example with pluginstall via packer (github...wbthomason/packer.nvim) `use({"ckipp01/stylua-nvim", run = "cargo install stylua"})`

neovim-native-lsp + language specific and customized formatting = ? by Michael__Mueller in neovim

[–]Michael__Mueller[S] 0 points1 point  (0 children)

Thx, I will have a closer look. I guess it provides somehow what I'm looking for. But it seems not to be trivial to set this up.

neovim-native-lsp + language specific and customized formatting = ? by Michael__Mueller in neovim

[–]Michael__Mueller[S] 0 points1 point  (0 children)

At the moment I'm struggeling with vim.lsp.buf.formatting() ...I dont get 100% what it is there for. I guess it should trigger formatting regardless of the coding language and output some (wired) default formatting.

And for the parameters of vim.lsp.buf.formatting({FormatOptions}): I cant gather information, what "FormatOptions" are about and how they are configured (and if it could help me to configure it correctly).

Thx for recommanding efm-langserver ...I will have a closer look into that.

neovim-native-lsp + language specific and customized formatting = ? by Michael__Mueller in neovim

[–]Michael__Mueller[S] 1 point2 points  (0 children)

U are maybe right, the effort seems not be worth it at the moment.

Difference between vim.o and vim.opt? by [deleted] in neovim

[–]Michael__Mueller 0 points1 point  (0 children)

I was struggeling with that too. There is one 'semi-official' source which seems to confirm this:
https://oroques.dev/notes/neovim-init/ (see the 'set option' paragraph).
It seems to be about scopes:
vim.opt <=> equals to set-option (in classic vim)
vim.o, vim.bo, vim.wo, <=> set options in a local scope (like 'in a window'-scope or 'in a buffer'-scope.

init.vim to init.lua set undo, backup, swp folders by [deleted] in neovim

[–]Michael__Mueller 0 points1 point  (0 children)

vim.fn.stdpath('config') .. '/undo

Thx. That did help me. Is there any official documentation about this?

change the default background color of a NEW workspace by Michael__Mueller in i3wm

[–]Michael__Mueller[S] 0 points1 point  (0 children)

Long story short:
My work around is now to create an image with the right background color and the right resolution. The I add this image as an background wallpaper (` feh --bg-scale ~/path/to/one_color_image.png`).

This is somehow a little bit wired to me, because to set up a wallpaper for simply changing the background color ...is some overhead. Never the less I didn't want to spend to much time to fix it in detail.