Skip to content

Commit d8bcd72

Browse files
committed
Added plugins for Python in Neovim Blog
Signed-off-by: ramzan3019 <kali.arch.78@gmail.com>
1 parent 6ed0d7e commit d8bcd72

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

content/posts/Neovim Plugins.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,20 @@ require("lazy").setup({
106106
}, lazy_config)
107107
```
108108

109-
2. For C/C++ development, ensure clangd is installed and configured:
109+
2. For C/C++ and Python development, ensure clangd and pyright is installed and configured:
110110
Add the following piece of code to init.lua after the ending of above mentioned code:
111111
```lua
112112
--clangd server setup
113113
local lspconfig = require('lspconfig')
114-
lspconfig.clangd.setup({
114+
lspconfig.clangd.setup({ --For C/C++
115115
cmd = { "clangd" }, -- Ensure this points to the system-installed clangd
116116
-- Additional configuration options can be added here
117117
})
118+
lspconfig.pyright.setup({ --For Python
119+
autoSearchPaths = true,
120+
diagnosticMode = "workplace", --you can also set it to "openFilesOnly" to check errors in only oepned files
121+
})
122+
118123
```
119124
3. `Edit lazy.lua` file to enable plugins and comment the lines after disabled_plugins lines like mentioned below:
120125
> Address: /home/username/.config/nvim/lua/configs/lazy.lua

0 commit comments

Comments
 (0)