Neovim - Null-LS Formatting, Linting & more (Supports prettier, black, eslint, flake8 & more)

  Рет қаралды 71,398

chris@machine

chris@machine

2 жыл бұрын

SUPPORT THE CHANNEL
💳 Patreon: / chrisatmachine
💰 Paypal: paypal.me/chrisatmachine
👕 Merch: shop.spreadshirt.com/chrisatm...
SOCIAL MEDIA
🕸️ Website: www.chrisatmachine.com
🐦 Twitter: / chrisatmachine
💻 Github: github.com/ChristianChiarulli
📺 Odysee: odysee.com/$/invite/@chrisatm...
💬 Matrix: matrix.to/#/+atmachine:matrix...
📡 Twitch: / chrisatmachine
🔌 Discord: / discord
GET INTO CRYPTO AND SUPPORT THE CHANNEL
🏦 Blockfi: blockfi.com/?ref=732f6bc1
💰 Celcius: celsiusnetwork.app.link/12138...
🪙 Coinbase: www.coinbase.com/join/chiaru_ij
💱 BinanceUS: accounts.binance.us/en/regist...
💸 Voyager: voyager.onelink.me/WNly/refer...
📈 OKCoin: www.okcoin.com/join?channelId...
₿ DONATE CRYPTO
Bitcoin: bc1qlw9t04evwvvlgkwkxf3cm9mfk6zgmy09sp4uja
Ethereum: 0x31202eF4Ce3d03c1B5111Bc388f937e7b17dd164
Litecoin: ltc1qmhxvmr9h3hpc226aeqj9sadwjn3gl0nh5qsvkf
Polkadot: 12pxctmVV3HBKqfpnPbgqznKHdpFbihVENH2VJU6Z5HsaD1S
Chainlink: 0x31202eF4Ce3d03c1B5111Bc388f937e7b17dd164
Bitcoin Cash: qqz56dl270wx04z4x8y42aft39ptpksjuggmel0hz6
XRP: raUaxdWMst1Eb96nACTvJTRWgtmsRQpwHk
Stellar: GD7PCULOCC4DLRJN6TJSWFTETDWL4D6URHXEBFX4B4RJQN4B5T7XZ5AU

Пікірлер: 58
@Pau1danelli
@Pau1danelli 2 жыл бұрын
Thank you so much for this series. I had some time over christmas and after watching these videos was able to translate my vimrc setup to be totally Lua.
@user-yn6ii7ys3u
@user-yn6ii7ys3u Жыл бұрын
Your playlists are the best neovim related content on youtube rn. Thank you very much for making these.
@pmerikan
@pmerikan 2 жыл бұрын
What can I say? Chris, you're the best!! 6 months ago I started migrating my vim config to Lua and also migrated to Lsp, but I never really landed it. I have picked some settings here and there but didn't always understand what it actually did. I have been following you for quite some time now and I must say that you are the only one that actually explains it to us mere mortals. Keep up the good work.
@h4pz
@h4pz 2 жыл бұрын
Thanks Chris for the great content. Always appreciated
@smjonas8616
@smjonas8616 2 жыл бұрын
Super useful, thank you! I've been trying to wrap my head around null-ls for quite some time. Now I finally understood it!
@exequiellaresdev
@exequiellaresdev 2 жыл бұрын
Thank you! I love this series. I'm finally could get my neovim php environment working 💪
@318307able
@318307able 2 жыл бұрын
Just simply the best. Thank you Chris
@nodidog
@nodidog 2 жыл бұрын
Thanks Chris, series has been very helpful
@Chris-jp6ll
@Chris-jp6ll Жыл бұрын
A second before throwing the towel your series comes along and saves the day. Thank you :)
@srinivasrg5125
@srinivasrg5125 Жыл бұрын
Thank you Chris. Great help for me!
@LongestYardstick
@LongestYardstick 2 жыл бұрын
Dude I’ve been playing with lunar vim all day and you’re a Lua coding monster! Really enjoying your code, thanks for everything.
@luskira
@luskira Жыл бұрын
Thanks so much you've lift such a weight from my shoulders by compiling this playlist
@ekekw930
@ekekw930 2 жыл бұрын
Thanks Chris
@MartinsTalbergs
@MartinsTalbergs 2 жыл бұрын
this vid will make numbers!
@ytcdi
@ytcdi 2 жыл бұрын
I am using it! Thanks
@josemiguelochoa5372
@josemiguelochoa5372 Жыл бұрын
Nice content. Thanks!
@LudoTechWorld
@LudoTechWorld 2 жыл бұрын
I'm successfully using this plugin, but it works because I copied configurations I found here and there, I didn't really understand how it works... until now! Thank you!
@tobias-edwards
@tobias-edwards 2 жыл бұрын
Thanks for this! The null-ls documentation is so verbose and hyperlinked. It's like navigating a digital Yellow pages
@tobias-edwards
@tobias-edwards 2 жыл бұрын
If null-ls is to bridge the gap between Neovim's native LSP and formatters, linters, etc. I see that the native LSP is slowly providing support for linters like 'eslint'. Would this mean that in time null-ls will be redundant?
@andresgutgon
@andresgutgon 2 жыл бұрын
Thanks a lot for these series. Is super good! I have a question, what about doing formating when saving the file?
@Heshamelfakharani
@Heshamelfakharani 2 жыл бұрын
thank you for all this. can you make an extra video for DAP or debugging in general?
@namtruong4071
@namtruong4071 Жыл бұрын
How can i setup prettier format on save base on local .prettierrc like vscode in null-ls
@blumaa
@blumaa 2 жыл бұрын
Hey man if you're ever in Berlin, let me know- I'll buy you a beer or two. Thanks for these tutorials!
@tridibbiswas3361
@tridibbiswas3361 2 жыл бұрын
Hi, Thank you for this video. I am using flake8 for diagnostics with null_ls. While its working properly I am getting two sets of same kind od diagnostics one from flake8 configured through null-ls and the other one through pyright which I am using as my lsp server. How to stop the diagnostics from pyright only and use the one from flake8
@IranzinhoBRG
@IranzinhoBRG 2 жыл бұрын
Is there a way to make .prettierrc options take precedence over "extra_args"? Great video, congrats!
@KronosaurusRex
@KronosaurusRex 2 жыл бұрын
Maybe this question is somewhat dumb, but is there a way of having that global prettier settings and adjusting so it respects the prettierrc or similar?
@flywithoutwingss
@flywithoutwingss 2 жыл бұрын
Hi, Ive been reading the documentation, but I cant figure out, how to configure options in prettier, like for example "--print-width 110", this value I cant use it as an extra argument, Dont know how to add arguments that need a name and a respective value. Anyone having this issue ? thanks.
@Oswee
@Oswee 2 жыл бұрын
Any idea how null-ls is different from efm-language-server? And can it chain multiple linters and formatters for a single buffer?
@atahanozbayram1619
@atahanozbayram1619 2 жыл бұрын
Is there any plugin that helps with updating imports and paths when a filename is changed?
@WeAreTeamNovus
@WeAreTeamNovus 2 жыл бұрын
How can I do formatting when writing to a file (:w)?
@willianalmeida3670
@willianalmeida3670 2 жыл бұрын
Can anyone show me a way to configure Lvim to develop in React. I couldn't configure auto complete for html tags (with auto closing) inside jsx/tsx..
@MohdAfnan
@MohdAfnan 2 жыл бұрын
Hey Chris can you make a video on cheovim which is made by NTBBloodbath
@ebiscaia
@ebiscaia 2 жыл бұрын
Hi Chris, When I try to format a lua file using :lua vim.lsp.buf.formatting_sync() it prompts me which formatter to use (summenko [lsp] or null-ls). Is there a way to choose the default one? Thanks
@ebiscaia
@ebiscaia 2 жыл бұрын
Nevermind, it was just a matter of seeing the rest of the video. Cheers, mate
@barefeg
@barefeg Жыл бұрын
@@ebiscaia What was the solution? he fixed it for tsserver but not lua
@ebiscaia
@ebiscaia Жыл бұрын
@@barefeg apply the same idea just change names
@roteshere
@roteshere 2 жыл бұрын
@julien4699
@julien4699 2 жыл бұрын
Hi Chris, thank you for the series. Im following one-by-one and finally decided to take the jump and ove over to the Lua side. Im facing a big speed issue on startup though. Im running macOS Catalina on a MBP 2019 16" (Intel) and nvim --startuptime takes about 400+ ms on every startup. Your startup speed seems much faster, could you run a benchmark and share your numbers?
@MartinsTalbergs
@MartinsTalbergs 2 жыл бұрын
Oh no, that is long startup, see the output of :scriptnames - a list of loaded junk, maybe something you do not need
@julien4699
@julien4699 2 жыл бұрын
@@MartinsTalbergs I have already tried to disable default plugins in my lua config. Not sure what else could be done... Full disk encryption is enabled on my laptop, perhaps it slows it down some. But judging by Chris' videos the startup is almost instant
@MartinsTalbergs
@MartinsTalbergs 2 жыл бұрын
@@julien4699 It might be that one of plugins has a bug - I had an issue due to bug in nvim-tree, if Git-icons were enabled, it took 400ms on every file write, due to doing some I/O stuff. Maybe it is deeper - if you happen to use apples M1 chip it has to carry out virtualization for another architecture, since the new one is not widely supported yet. You already mentioned the "nvim --startuptime", see the step that has the longest exec time there. Encryption should not be the issue.
@julien4699
@julien4699 2 жыл бұрын
@@MartinsTalbergs Im running a "nvim --startuptime" for each branch as I go. LSP + cmp seems to add a bit of overhead. But nothing stands out that much to me. What surprises me is how quickly the startup slows down when adding a few more plugins (cloning a later branch in the series) while I read of people with 40+ plugins getting startup times under 100ms My machine is Intel-based FWIW
@rounakjain5774
@rounakjain5774 2 жыл бұрын
Thanks for all the good work! However, I just lost an hour because I used your config and had not watched this video. The team at my workplace prefers double quotes. I was trying all sorts of things in my `.eslintrc` and `.prettierrc` but could not stop nvim from changing double quotes to single quotes. So, I guess its not really a good idea to keep the `--single-quote` preference in `null-ls.lua`
@zen-ventzi-marinov
@zen-ventzi-marinov Жыл бұрын
Does you .pretterrc just work out of the box? If it does work, would you mind a quick test with .prettierignore(e.g. add a *.ts or some other file) and see if it works?
@aaronyx2124
@aaronyx2124 Жыл бұрын
in case anyone ran :lua vim.lsp.buf.formatting_sync() and got an error, change it to :lua vim.lsp.buf.format() and you should be fine
@nex7268
@nex7268 2 жыл бұрын
what broswer r u using, that theme looks extreamly cool :D
@chrisatmachine
@chrisatmachine 2 жыл бұрын
brave
@chuny_dev
@chuny_dev 2 жыл бұрын
In html appears the prompt :C
@TheZusak
@TheZusak Жыл бұрын
Can you instead use Mason to install the formatters and use null-ls to apply formatting?
@br3ntor
@br3ntor 11 ай бұрын
That's what I did and worked for me.
@wayneswildworld
@wayneswildworld Жыл бұрын
How do you install the binary for black?
@chrisatmachine
@chrisatmachine Жыл бұрын
using mason now, could also use a package manager
@wayneswildworld
@wayneswildworld Жыл бұрын
​@@chrisatmachine Firstly thank you for responding. I've gotten everything working with no errors however I can't seem to figure out how to get prettier to work I can't run the vim formating command that you use in this video. The other thing I am struggling to figure out is how to do find and replace in vim. If you can help me with these issues I would really appreciate it. I made an issue on git hub wakywayne
@helloquico
@helloquico 2 жыл бұрын
'brew install stylua' on a mac
@rubempacelli6815
@rubempacelli6815 2 жыл бұрын
Why do I find you only now? 😵
@djcardwell
@djcardwell Жыл бұрын
6:55
@cthutu
@cthutu Жыл бұрын
I prefer to add "vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.formatting_sync()]]" to my init script to do formatting everytime I save a file.
2 жыл бұрын
-- Filename: /home/sergio/.config/nvim/after/ftplugin/lua.lua -- Last Change: Wed, 15 Jun 2022 - 17:21 -- formatoptions for specifi buffer type vim.bo.formatoptions = 'jnql'
I Tried Every AI Coding Assistant for Neovim
17:30
DevOps Toolbox
Рет қаралды 27 М.
Vim Tips You Probably Never Heard of
12:11
Luke Smith
Рет қаралды 115 М.
WHAT’S THAT?
00:27
Natan por Aí
Рет қаралды 14 МЛН
Neovim - From Scratch Q&A
17:39
chris@machine
Рет қаралды 16 М.
AstroNvim - лучшая IDE на NeoVim для разработчика
32:54
PurpleSchool | Anton Larichev
Рет қаралды 69 М.
Why I Use Neovim From Within VS Code - Neovim Conf 2022 Talk
15:49
Why I Switched From VSCode To NeoVim - My Setup
13:11
Anthony GG
Рет қаралды 69 М.
Tmux From Scratch To BEAST MODE
12:44
DevOps Toolbox
Рет қаралды 103 М.
Neovim With AstroNvim | Your New Advanced Development Editor
16:08
A Few Vim Plugins That Have Impressed Me Recently
13:31
DistroTube
Рет қаралды 122 М.
How to Vim in 2023: Tips and Tricks
15:53
ThePrimeagen
Рет қаралды 406 М.
VSCode to LunarVim
8:56
Christopher Kapic
Рет қаралды 34 М.
iPhone 15 Pro Max vs IPhone Xs Max  troll face speed test
0:33
АЙФОН 20 С ФУНКЦИЕЙ ВИДЕНИЯ ОГНЯ
0:59
КиноХост
Рет қаралды 1,2 МЛН
#samsung #retrophone #nostalgia #x100
0:14
mobijunk
Рет қаралды 13 МЛН
$1 vs $100,000 Slow Motion Camera!
0:44
Hafu Go
Рет қаралды 28 МЛН
İĞNE İLE TELEFON TEMİZLEMEK!🤯
0:17
Safak Novruz
Рет қаралды 857 М.