Skip to content

Commit 6b539b8

Browse files
committed
Fixed bug
Signed-off-by: ramzan3019 <kali.arch.78@gmail.com>
1 parent 6e76ffc commit 6b539b8

File tree

8 files changed

+53
-18
lines changed

8 files changed

+53
-18
lines changed

content/posts/Neovim Plugins.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ tag = ["Neovim","Lua","ChatGPT"]
66
---
77

88
## Part 1: Setting Up NVChad
9-
9+
>Note: I am using Arch Linux. So, use terminal commands as per your Distro.
1010
### Step 1: Removing any previous configuration
1111

1212
1. Linux/MacOS Users
@@ -106,7 +106,15 @@ require("lazy").setup({
106106
}, lazy_config)
107107
```
108108

109-
2. For C/C++ and Python development, ensure clangd and pyright is installed and configured:
109+
2. Before moving further make sure that you have installed `npm` server on your system. If not, then download it using:
110+
```lua
111+
sudo pacman -S nodejs npm
112+
```
113+
```lua
114+
sudo npm install -g pyright
115+
```
116+
117+
3. For C/C++ and Python development, ensure clangd and pyright is installed and configured:
110118
Add the following piece of code to init.lua after the ending of above mentioned code:
111119
```lua
112120
--clangd server setup
@@ -121,7 +129,7 @@ lspconfig.pyright.setup({ --For Python
121129
})
122130

123131
```
124-
3. `Edit lazy.lua` file to enable plugins and comment the lines after disabled_plugins lines like mentioned below:
132+
4. `Edit lazy.lua` file to enable plugins and comment the lines after disabled_plugins lines like mentioned below:
125133
> Address: /home/username/.config/nvim/lua/configs/lazy.lua
126134
127135
```lua
@@ -160,15 +168,15 @@ lspconfig.pyright.setup({ --For Python
160168
},
161169

162170
```
163-
4. Open nvim and install lsp for any language, I am doing for C/C++ and Python:
171+
5. Open nvim and install lsp for any language, I am doing for C/C++ and Python:
164172
```python
165173
:MasonInstall clangd
166174
:MasonIntall python-lsp-server
167175
:MasonInstall pyright
168176
```
169177
> In MasonInstall menu, Press U to update and arrow key to scroll and find your required lsp
170178
171-
5. Update packages using:
179+
6. Update packages using:
172180
```lua
173181
:Lazy update
174182
```

public/archives/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ <h3 class="archive-month-header" id="2025-February">
137137
<div class="archive-entry">
138138
<h3 class="archive-entry-title entry-hint-parent">Neovim Complete Setup and Integrating ChatGPT
139139
</h3>
140-
<div class="archive-meta"><span title='2025-02-08 23:28:37 +0500 PKT'>February 8, 2025</span>&nbsp;·&nbsp;2 min</div>
140+
<div class="archive-meta"><span title='2025-02-08 23:28:37 +0500 PKT'>February 8, 2025</span>&nbsp;·&nbsp;5 min</div>
141141
<a class="entry-link" aria-label="post link to Neovim Complete Setup and Integrating ChatGPT" href="http://localhost:1313/posts/neovim-plugins/"></a>
142142
</div>
143143
<div class="archive-entry">

public/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ <h2 class="entry-hint-parent">Neovim Complete Setup and Integrating ChatGPT
166166
</h2>
167167
</header>
168168
<div class="entry-content">
169-
<p> Part 1: Setting Up NVChad Step 1: Removing any previous configuration Linux/MacOS Users rm -rf ~/.config/nvim rm -rf ~/.local/state/nvim rm -rf ~/.local/share/nvim Flatpak(Linux) Users rm -rf ~/.var/app/io.neovim.nvim/config/nvim rm -rf ~/.var/app/io.neovim.nvim/data/nvim rm -rf ~/.var/app/io.neovim.nvim/.local/state/nvim Window Users CMD rd -r ~\AppData\Local\nvim rd -r ~\AppData\Local\nvim-data Powershell rm -Force ~\AppData\Local\nvim rm -Force ~\AppData\Local\nvim-data Step 2: Installing NVChad Clone the NVChad repository Linux/MacOS: git clone https://github.com/NvChad/starter ~/.config/nvim &amp;&amp; nvim Flatpak: git clone https://github.com/NvChad/starter ~/.var/app/io.neovim.nvim/config/nvim &amp;&amp; flatpak run io.neovim.nvim Windows (CMD): git clone https://github.com/NvChad/starter %USERPROFILE%\AppData\Local\nvim &amp;&amp; nvim Windows (Powershell): git clone https://github.com/NvChad/starter $ENV:USERPROFILE\AppData\Local\nvim &amp;&amp; nvim Step 3: Basic Neovim commands to attempt further processes Type nvim or neovim on the terminal before any file name(optional) to enter into neovim environment.
169+
<p> Part 1: Setting Up NVChad Note: I am using Arch Linux. So, use terminal commands according to your Distro.
170+
Step 1: Removing any previous configuration Linux/MacOS Users rm -rf ~/.config/nvim rm -rf ~/.local/state/nvim rm -rf ~/.local/share/nvim Flatpak(Linux) Users rm -rf ~/.var/app/io.neovim.nvim/config/nvim rm -rf ~/.var/app/io.neovim.nvim/data/nvim rm -rf ~/.var/app/io.neovim.nvim/.local/state/nvim Window Users CMD rd -r ~\AppData\Local\nvim rd -r ~\AppData\Local\nvim-data Powershell rm -Force ~\AppData\Local\nvim rm -Force ~\AppData\Local\nvim-data Step 2: Installing NVChad Clone the NVChad repository Linux/MacOS: git clone https://github.com/NvChad/starter ~/.config/nvim &amp;&amp; nvim Flatpak: git clone https://github.com/NvChad/starter ~/.var/app/io.neovim.nvim/config/nvim &amp;&amp; flatpak run io.neovim.nvim Windows (CMD): git clone https://github.com/NvChad/starter %USERPROFILE%\AppData\Local\nvim &amp;&amp; nvim Windows (Powershell): git clone https://github.com/NvChad/starter $ENV:USERPROFILE\AppData\Local\nvim &amp;&amp; nvim Step 3: Basic Neovim commands to attempt further processes Type nvim or neovim on the terminal before any file name(optional) to enter into neovim environment.
170171
...</p>
171172
</div>
172173
<footer class="entry-footer"><span title='2025-02-08 23:28:37 +0500 PKT'>February 8, 2025</span>&nbsp;·&nbsp;5 min</footer>

public/index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

public/index.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
<guid>http://localhost:1313/posts/neovim-plugins/</guid>
1616
<description>&lt;hr&gt;
1717
&lt;h2 id=&#34;part-1-setting-up-nvchad&#34;&gt;Part 1: Setting Up NVChad&lt;/h2&gt;
18+
&lt;blockquote&gt;
19+
&lt;p&gt;Note: I am using Arch Linux. So, use terminal commands according to your Distro.&lt;/p&gt;&lt;/blockquote&gt;
1820
&lt;h3 id=&#34;step-1-removing-any-previous-configuration&#34;&gt;Step 1: Removing any previous configuration&lt;/h3&gt;
1921
&lt;ol&gt;
2022
&lt;li&gt;Linux/MacOS Users&lt;/li&gt;

public/posts/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,11 @@ <h2 class="entry-hint-parent">Neovim Complete Setup and Integrating ChatGPT
130130
</h2>
131131
</header>
132132
<div class="entry-content">
133-
<p> Part 1: Setting Up NVChad Step 1: Removing any previous configuration Linux/MacOS Users rm -rf ~/.config/nvim rm -rf ~/.local/state/nvim rm -rf ~/.local/share/nvim Flatpak(Linux) Users rm -rf ~/.var/app/io.neovim.nvim/config/nvim rm -rf ~/.var/app/io.neovim.nvim/data/nvim rm -rf ~/.var/app/io.neovim.nvim/.local/state/nvim Window Users CMD rd -r ~\AppData\Local\nvim rd -r ~\AppData\Local\nvim-data Powershell rm -Force ~\AppData\Local\nvim rm -Force ~\AppData\Local\nvim-data Step 2: Installing NVChad Clone the NVChad repository Linux/MacOS: git clone https://github.com/NvChad/starter ~/.config/nvim &amp;&amp; nvim Flatpak: git clone https://github.com/NvChad/starter ~/.var/app/io.neovim.nvim/config/nvim &amp;&amp; flatpak run io.neovim.nvim Windows (CMD): git clone https://github.com/NvChad/starter %USERPROFILE%\AppData\Local\nvim &amp;&amp; nvim Windows (Powershell): git clone https://github.com/NvChad/starter $ENV:USERPROFILE\AppData\Local\nvim &amp;&amp; nvim Step 3: Basic Neovim commands to attempt further processes Type nvim or neovim on the terminal before any file name(optional) to enter into neovim environment.
133+
<p> Part 1: Setting Up NVChad Note: I am using Arch Linux. So, use terminal commands according to your Distro.
134+
Step 1: Removing any previous configuration Linux/MacOS Users rm -rf ~/.config/nvim rm -rf ~/.local/state/nvim rm -rf ~/.local/share/nvim Flatpak(Linux) Users rm -rf ~/.var/app/io.neovim.nvim/config/nvim rm -rf ~/.var/app/io.neovim.nvim/data/nvim rm -rf ~/.var/app/io.neovim.nvim/.local/state/nvim Window Users CMD rd -r ~\AppData\Local\nvim rd -r ~\AppData\Local\nvim-data Powershell rm -Force ~\AppData\Local\nvim rm -Force ~\AppData\Local\nvim-data Step 2: Installing NVChad Clone the NVChad repository Linux/MacOS: git clone https://github.com/NvChad/starter ~/.config/nvim &amp;&amp; nvim Flatpak: git clone https://github.com/NvChad/starter ~/.var/app/io.neovim.nvim/config/nvim &amp;&amp; flatpak run io.neovim.nvim Windows (CMD): git clone https://github.com/NvChad/starter %USERPROFILE%\AppData\Local\nvim &amp;&amp; nvim Windows (Powershell): git clone https://github.com/NvChad/starter $ENV:USERPROFILE\AppData\Local\nvim &amp;&amp; nvim Step 3: Basic Neovim commands to attempt further processes Type nvim or neovim on the terminal before any file name(optional) to enter into neovim environment.
134135
...</p>
135136
</div>
136-
<footer class="entry-footer"><span title='2025-02-08 23:28:37 +0500 PKT'>February 8, 2025</span>&nbsp;·&nbsp;2 min</footer>
137+
<footer class="entry-footer"><span title='2025-02-08 23:28:37 +0500 PKT'>February 8, 2025</span>&nbsp;·&nbsp;5 min</footer>
137138
<a class="entry-link" aria-label="post link to Neovim Complete Setup and Integrating ChatGPT" href="http://localhost:1313/posts/neovim-plugins/"></a>
138139
</article>
139140

public/posts/index.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
<guid>http://localhost:1313/posts/neovim-plugins/</guid>
1616
<description>&lt;hr&gt;
1717
&lt;h2 id=&#34;part-1-setting-up-nvchad&#34;&gt;Part 1: Setting Up NVChad&lt;/h2&gt;
18+
&lt;blockquote&gt;
19+
&lt;p&gt;Note: I am using Arch Linux. So, use terminal commands according to your Distro.&lt;/p&gt;&lt;/blockquote&gt;
1820
&lt;h3 id=&#34;step-1-removing-any-previous-configuration&#34;&gt;Step 1: Removing any previous configuration&lt;/h3&gt;
1921
&lt;ol&gt;
2022
&lt;li&gt;Linux/MacOS Users&lt;/li&gt;

public/posts/neovim-plugins/index.html

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
<meta name="keywords" content="">
1010
<meta name="description" content="
1111
Part 1: Setting Up NVChad
12+
13+
Note: I am using Arch Linux. So, use terminal commands according to your Distro.
1214
Step 1: Removing any previous configuration
1315
1416
Linux/MacOS Users
@@ -218,6 +220,8 @@ <h1 class="post-title entry-hint-parent">
218220

219221
<div class="post-content"><hr>
220222
<h2 id="part-1-setting-up-nvchad">Part 1: Setting Up NVChad<a hidden class="anchor" aria-hidden="true" href="#part-1-setting-up-nvchad">#</a></h2>
223+
<blockquote>
224+
<p>Note: I am using Arch Linux. So, use terminal commands according to your Distro.</p></blockquote>
221225
<h3 id="step-1-removing-any-previous-configuration">Step 1: Removing any previous configuration<a hidden class="anchor" aria-hidden="true" href="#step-1-removing-any-previous-configuration">#</a></h3>
222226
<ol>
223227
<li>Linux/MacOS Users</li>
@@ -321,16 +325,25 @@ <h3 id="step-2-installing-nvchad">Step 2: Installing NVChad<a hidden class="anch
321325
</span></span><span style="display:flex;"><span> { import <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;plugins&#34;</span>},
322326
</span></span><span style="display:flex;"><span>}, lazy_config)
323327
</span></span></code></pre></div><ol start="2">
324-
<li>For C/C++ development, ensure clangd is installed and configured:
328+
<li>Before moving further make sure that you have installed <code>npm</code> server on your system. If not, then download it using:</li>
329+
</ol>
330+
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-lua" data-lang="lua"><span style="display:flex;"><span> sudo pacman <span style="color:#f92672">-</span>S nodejs npm
331+
</span></span></code></pre></div><div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-lua" data-lang="lua"><span style="display:flex;"><span>sudo npm install <span style="color:#f92672">-</span>g pyright
332+
</span></span></code></pre></div><ol start="3">
333+
<li>For C/C++ and Python development, ensure clangd and pyright is installed and configured:
325334
Add the following piece of code to init.lua after the ending of above mentioned code:</li>
326335
</ol>
327336
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-lua" data-lang="lua"><span style="display:flex;"><span><span style="color:#75715e">--clangd server setup</span>
328337
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">local</span> lspconfig <span style="color:#f92672">=</span> require(<span style="color:#e6db74">&#39;lspconfig&#39;</span>)
329-
</span></span><span style="display:flex;"><span>lspconfig.clangd.setup({
338+
</span></span><span style="display:flex;"><span>lspconfig.clangd.setup({ <span style="color:#75715e">--For C/C++</span>
330339
</span></span><span style="display:flex;"><span> cmd <span style="color:#f92672">=</span> { <span style="color:#e6db74">&#34;clangd&#34;</span> }, <span style="color:#75715e">-- Ensure this points to the system-installed clangd</span>
331340
</span></span><span style="display:flex;"><span> <span style="color:#75715e">-- Additional configuration options can be added here</span>
332341
</span></span><span style="display:flex;"><span>})
333-
</span></span></code></pre></div><ol start="3">
342+
</span></span><span style="display:flex;"><span>lspconfig.pyright.setup({ <span style="color:#75715e">--For Python</span>
343+
</span></span><span style="display:flex;"><span> autoSearchPaths <span style="color:#f92672">=</span> <span style="color:#66d9ef">true</span>,
344+
</span></span><span style="display:flex;"><span> diagnosticMode <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;workplace&#34;</span>, <span style="color:#75715e">--you can also set it to &#34;openFilesOnly&#34; to check errors in only oepned files</span>
345+
</span></span><span style="display:flex;"><span>})
346+
</span></span></code></pre></div><ol start="4">
334347
<li><code>Edit lazy.lua</code> file to enable plugins and comment the lines after disabled_plugins lines like mentioned below:</li>
335348
</ol>
336349
<blockquote>
@@ -368,13 +381,15 @@ <h3 id="step-2-installing-nvchad">Step 2: Installing NVChad<a hidden class="anch
368381
</span></span><span style="display:flex;"><span> },
369382
</span></span><span style="display:flex;"><span> },
370383
</span></span><span style="display:flex;"><span> },
371-
</span></span></code></pre></div><ol start="4">
372-
<li>Open nvim and install lsp for any language, I am doing for C/C++:</li>
384+
</span></span></code></pre></div><ol start="5">
385+
<li>Open nvim and install lsp for any language, I am doing for C/C++ and Python:</li>
373386
</ol>
374387
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-python" data-lang="python"><span style="display:flex;"><span> :MasonInstall clangd
388+
</span></span><span style="display:flex;"><span> :MasonIntall python<span style="color:#f92672">-</span>lsp<span style="color:#f92672">-</span>server
389+
</span></span><span style="display:flex;"><span> :MasonInstall pyright
375390
</span></span></code></pre></div><blockquote>
376391
<p>In MasonInstall menu, Press U to update and arrow key to scroll and find your required lsp</p></blockquote>
377-
<ol start="5">
392+
<ol start="6">
378393
<li>Update packages using:</li>
379394
</ol>
380395
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-lua" data-lang="lua"><span style="display:flex;"><span> :Lazy update
@@ -423,6 +438,13 @@ <h3 id="step-2-save-into-your-zsh-or-bash-file">Step 2: Save into your zsh or ba
423438
<p>Address: /home/username/.config/nvim/init.lua</p></blockquote>
424439
<p>Locate the following piece of code into init.lua file:</p>
425440
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-lua" data-lang="lua"><span style="display:flex;"><span> {
441+
</span></span><span style="display:flex;"><span> <span style="color:#e6db74">&#34;NvChad/NvChad&#34;</span>,
442+
</span></span><span style="display:flex;"><span> lazy <span style="color:#f92672">=</span> <span style="color:#66d9ef">false</span>,
443+
</span></span><span style="display:flex;"><span> branch <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;v2.5&#34;</span>,
444+
</span></span><span style="display:flex;"><span> import <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;nvchad.plugins&#34;</span>,
445+
</span></span><span style="display:flex;"><span> },
446+
</span></span></code></pre></div><p>Then, add the following beautiful text just after it:</p>
447+
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-lua" data-lang="lua"><span style="display:flex;"><span> {
426448
</span></span><span style="display:flex;"><span> <span style="color:#e6db74">&#34;jackMort/ChatGPT.nvim&#34;</span>,
427449
</span></span><span style="display:flex;"><span> event <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;VeryLazy&#34;</span>,
428450
</span></span><span style="display:flex;"><span> dependencies <span style="color:#f92672">=</span> {
@@ -431,8 +453,7 @@ <h3 id="step-2-save-into-your-zsh-or-bash-file">Step 2: Save into your zsh or ba
431453
</span></span><span style="display:flex;"><span> <span style="color:#e6db74">&#34;nvim-telescope/telescope.nvim&#34;</span>,
432454
</span></span><span style="display:flex;"><span> <span style="color:#e6db74">&#34;folke/trouble.nvim&#34;</span>,
433455
</span></span><span style="display:flex;"><span> },
434-
</span></span></code></pre></div><p>Then, add the following beautiful text just after it:</p>
435-
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-lua" data-lang="lua"><span style="display:flex;"><span> config <span style="color:#f92672">=</span> <span style="color:#66d9ef">function</span>()
456+
</span></span><span style="display:flex;"><span> config <span style="color:#f92672">=</span> <span style="color:#66d9ef">function</span>()
436457
</span></span><span style="display:flex;"><span> require(<span style="color:#e6db74">&#34;chatgpt&#34;</span>).setup({
437458
</span></span><span style="display:flex;"><span> <span style="color:#75715e">-- Your ChatGPT.nvim configuration</span>
438459
</span></span><span style="display:flex;"><span> api_key_cmd <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;echo $OPENAI_API_KEY&#34;</span>,

0 commit comments

Comments
 (0)