1 == nwiz, the code editor for a more civilized era ==
5 ** My goal is using [[https://neovim.io/ | Neovim]] as a modern coding environment for C, C++, Rust, Python and other languages. **
7 <div style="float: right">{{nvim-completion.png | maxwidth=600}}</div>
9 Neovim has no shortage of powerful plugins for programmers, but it's a fast moving ecosystem.
10 Picking the right combination of plugins and configuring them as an integrated development
11 environment is still far from trivial. I also reviewed a number of GUIs and "super plugins"
12 which aim to be a complete IDE, but all of them had maturity and usability issues.
14 I curated a list of well-maintained plugins that take advantage of Neovim's built-in IDE components:
16 * Language Server Protocol, for semantic completion
17 * Treesitter, for semantic syntax highlighting
18 * Virtual text, for inline diagnostics
19 * Floating windows, for inline help and function parameter assistance
21 The plugin ecosystem is still maturing, but over time the amount of Lua scripting required
22 to piece together a fully functional IDE seems to be going down. Ideally, you wouldn't have
23 to learn Lua to edit your Neovim config.
25 ** I want a programmer's editor without becoming the editor's programmer! **
30 * Quickly open files with fuzzy search
32 * Configures language servers for C/C++, Rust, Python
33 * Adding more languages made easy by lspconfig
34 * Inline diagnostics and hints
39 TODO: Minimum neovim version?
41 TODO: Recommend a good terminal with undercurls, mouse support...
43 TODO: Nerd fonts installation
48 To get started, download nwiz.lua to Neovim's plugin dir so it will be autoloaded at startup:
51 curl https://codewiz.org/pub/dotfiles/nwiz.lua -o ~/.config/nvim/plugin/nwiz.lua
54 Everything is in a single file for ease of installation and to remind me to keep it short and simple.
56 I'm also sharing my generic .vimrc, which doesn't use Lua and works with both Neovim and Vim 9:
59 curl https://codewiz.org/pub/dotfiles/vimrc
62 Rather than overwrite your existing ##~./vimrc##, you might want to review and take some of my settings
63 for syntax highlighting and smart indentation.
68 On first run, Packer (the plugin manager) will bootstrap itself and install all plugins.
69 There's a good chance this will fail the first time due to the asynchronous nature of PackerSync
72 Any time you edit the list of plugins, run ##:PackerSync## to install, uninstall & update them. Easy!
74 === Language Servers ===
76 Neovim 0.7 comes with a built-in LSP client. The official [[https://github.com/neovim/nvim-lspconfig | nvim-lspconfig]]
77 plugin abstracts the details of spawning the correct Language Server for a multitude of filetypes.
79 Download and installation of language servers can be managed automatically by
80 [[https://github.com/williamboman/nvim-lsp-installer | nvim-lsp-installer]], but I find that it's
81 simpler (and much safer!) to install the already packaged ones from Linux distro. This also ensures
82 that they stay aligned with the system toolchain.
86 * Python: python-lsp-server (which uses mypy, pylint, autopep8...)
88 === Treesitter syntax parsers ===
90 Install the ones you like from this list: https://github.com/nvim-treesitter/nvim-treesitter#supported-languages
92 For instance, I installed these:
95 :TSInstall cpp rust lua python bash vim
98 You can refresh your parsers at any time with ##:TSUpdate##
100 === Semantic completion ===
104 TODO: docs for [[https://github.com/hrsh7th/nvim-cmp#readme | cmp-nvim]]
107 === Finding and opening files ===
109 {{nvim-telescope.png | maxwidth=400}}
112 TODO: docs for [[https://github.com/nvim-telescope/telescope.nvim | telescope.nvim]]
114 === Realtime diagnostics and hints ===