Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
nvim-ts-context-commentstring
Neovim treesitter plugin for setting the commentstring based on the cursor location in a file.
-
Comment.nvim
:brain: :muscle: // Smart and powerful comment plugin for neovim. Supports treesitter, dot repeat, left-right/up-down motions, hooks, and more
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
For code highlighting you probably want to use treesitter. I am not aware about neovim using any semantic highlighting that comes from tsserver (compared to VSCode, for which tsserver is the source for semantic highlighting).
Anyway, here are my dotfiles for neovim (link). There you may find some configuration for tsserver and for formatter, hope you'll find it useful.
So you probably need to set some formatting options on tsserver. As I can see from (typescript-language-server doc)[https://github.com/typescript-language-server/typescript-language-server], you can set [language].format.tabSize option there.
LSP - just installed the typescript lsp using nvim-lsp-installer just like you. I also have the lsps for css, html and tailwindcss (many others as well but these are good to have for React dev). I use nvim-cmp for autocomplete.
Treesitter - nvim-treesitter for some syntax highlighting, also super helpful is nvim-ts-context-commentstring for context based commenting with comment.nvim
Treesitter - nvim-treesitter for some syntax highlighting, also super helpful is nvim-ts-context-commentstring for context based commenting with comment.nvim
Formatting - I just use prettier with neoformat. For indent size, I just do setlocal tabstop=2 shiftwidth=2 softtabstop=2 within ftplugin/javascriptreact.vim (and others - probably a better way to do this but it works).
I think that's about it for the essentials. Here's my config if anyone's interested.