dotfiles
prettierd
Our great sponsors
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
dotfiles
-
What’s your ya combination of lsp, linter and formatter for JS?
I never figured out null-ls for some reason but currently use formatter.nvim to run prettier on save... I do have eslint and typescript diagnostics ...setup looks like this for lsp https://github.com/cmdcolin/dotfiles/blob/master/lua/settings.lua and this for formatting https://github.com/cmdcolin/dotfiles/blob/master/lua/formatting.lua is
- autoformat with lsp-zero
-
Advice on switching from CoC to LSP
personally, i have not had a good experience with integrating eslint, and the prettier experience required some hand-rolling my own config. methods like null-ls never seemed to click with me, so i don't use it. i have auto-format-on-save with prettier using formatter.nvim. my setup https://github.com/cmdcolin/dotfiles
-
What LSP are you using for ReactJS projects and does it have auto imports?
generally for autoimports I have to hit tab and it brings up an auto-complete popup menu next to the cursor, and then it will auto-import the thing I selected from the auto-complete. I don't have any special code that does this in my config afaik so it might be something lsp helps with https://github.com/cmdcolin/dotfiles/blob/master/.vimrc
- I'm searching for nvim configs of react/js developers
-
How to switch from CoC to built in Nvim-LSP?
I was starting to do this here https://github.com/cmdcolin/dotfiles/pull/1/files
prettierd
-
My Neovim setup for React, TypeScript, Tailwind CSS, etc
First, you need prettierd:
-
This j/k mappings should be default (for wrap) at least in Plugins like vim-pencil
Besides remapping keys, auto-format with prettier (null-ls, ALE, etc) will wrap your code on line break. This might not be desirable for txt files, but it's transparent and fully supported by markdown. It'll also fix things like aligning your markdown tables. There's also prettierd and prettier_d_slim to keep it running as a daemon in the background, which makes the buffer reformatting really snappy.
-
I'm searching for nvim configs of react/js developers
For react you will need the one for typescript and the eslint lsp is also used in the config to auto fix errors on save. Also this relies on prettierd to be installed globally: https://github.com/fsouza/prettierd
- Anyone know how to make prettier run faster when run on save? It takes about 2 seconds every time I write my buffer to desk for Neovim to become responsive again.
What are some alternatives?
prettier-plugin-sort-imports - A prettier plugin to sort imports in typescript and javascript files by the provided RegEx order.
dotfiles
prettier_d_slim
dotfiles - All of my dotfiles are here.
CNvim - A lightweight Neovim config for web development
parallel-prettier - Concurrent prettier runner
gts - ☂️ TypeScript style guide, formatter, and linter.
nvim-lua-guide - A guide to using Lua in Neovim
dotfiles - ❄️ My dotfiles for NixOS and macOS as a Nix flake. Neovim, Fish shell, Wezterm, etc.
packer.nvim - A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config
nvim-treesitter - Nvim Treesitter configurations and abstraction layer
vim-js-file-import - Import/require files in javascript and typescript with single button!