Jump to content

Trying to setup Neovim.

Gat Pelsinger

I used this guide - https://www.youtube.com/watch?v=stqUbv-5u2s&t=495s

Which stated me to use this config - https://github.com/nvim-lua/kickstart.nvim

 

I did install the file tree and auto parenthesis plugins (I don't know why such things weren't already installed), but I am still missing some features. For autocomplete, I only seem to get code snippets, but nothing else. No autocomplete when writing "int", and no autocomplete which shows the data members of structs (btw I use C), which sucks. I would also like to know what other plugins might be helpful.

 

Microsoft owns my soul.

 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

5 hours ago, Gat Pelsinger said:

I did install the file tree and auto parenthesis plugins (I don't know why such things weren't already installed

Personal preference. It is meant to provide a basic experience on its own that you can customise to your liking through plugins. I don't want or need a file tree in vim, for example.

 

5 hours ago, Gat Pelsinger said:

I did install the file tree and auto parenthesis plugins (I don't know why such things weren't already installed), but I am still missing some features. For autocomplete, I only seem to get code snippets, but nothing else. No autocomplete when writing "int", and no autocomplete which shows the data members of structs (btw I use C), which sucks.

Did you install the LSP for C as mentioned in this issue, for example? https://github.com/nvim-lua/kickstart.nvim/issues/268

 

5 hours ago, Gat Pelsinger said:

I would also like to know what other plugins might be helpful.

Harpoon: https://github.com/ThePrimeagen/harpoon/tree/harpoon2

 

Takes a bit of tinkering to set up, but the Telescope + Harpoon combo has skyrocketed my development pace if I'm in the flow.

Crystal: CPU: i7 7700K | Motherboard: Asus ROG Strix Z270F | RAM: GSkill 16 GB@3200MHz | GPU: Nvidia GTX 1080 Ti FE | Case: Corsair Crystal 570X (black) | PSU: EVGA Supernova G2 1000W | Monitor: Asus VG248QE 24"

Laptop: Dell XPS 13 9370 | CPU: i5 10510U | RAM: 16 GB

Server: CPU: i5 4690k | RAM: 16 GB | Case: Corsair Graphite 760T White | Storage: 19 TB

Link to comment
Share on other sites

Link to post
Share on other sites

@tikker Ok, I got the LSP working, but it doesn't know any include files, not even of C standard library. Where do I include the files?

Microsoft owns my soul.

 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, Gat Pelsinger said:

@tikker Ok, I got the LSP working, but it doesn't know any include files, not even of C standard library. Where do I include the files?

What do you mean with "it doesn't know any include files"? Like it errors on them? I don't program C so I've never set it up for that. There might be something about the setup that needs to be tweaked for it judging from e.g. https://stackoverflow.com/questions/73395641/in-included-file-begin-code-h-file-not-found-occurring-in-neovim-lsp and https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#clangd.

 

Crystal: CPU: i7 7700K | Motherboard: Asus ROG Strix Z270F | RAM: GSkill 16 GB@3200MHz | GPU: Nvidia GTX 1080 Ti FE | Case: Corsair Crystal 570X (black) | PSU: EVGA Supernova G2 1000W | Monitor: Asus VG248QE 24"

Laptop: Dell XPS 13 9370 | CPU: i5 10510U | RAM: 16 GB

Server: CPU: i5 4690k | RAM: 16 GB | Case: Corsair Graphite 760T White | Storage: 19 TB

Link to comment
Share on other sites

Link to post
Share on other sites

@tikker Man I don't know I am completely overwhelmed. I tried following the stackoverflow thread you told, but I don't know till where exactly I need to paste the include location. I am using Mingw-w64 for GCC on Windows. I know where my GCC installation is but what all directories I need to paste? And also, do I need to do something else for it to read my compile_flags file?

Microsoft owns my soul.

 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

@tikker btw I still need help 😑

Microsoft owns my soul.

 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

On 1/31/2024 at 7:52 AM, Gat Pelsinger said:

@tikker Man I don't know I am completely overwhelmed. I tried following the stackoverflow thread you told, but I don't know till where exactly I need to paste the include location. I am using Mingw-w64 for GCC on Windows. I know where my GCC installation is but what all directories I need to paste? And also, do I need to do something else for it to read my compile_flags file?

Hmm I've never used it on Windows, but I guess to some extent things should be similar. Let's start at the beginning and see which plugins are present. Assuming  you are running the latest version that uses lazy as a package manager instead of Mason, what does it show if you type :Lazy?

Crystal: CPU: i7 7700K | Motherboard: Asus ROG Strix Z270F | RAM: GSkill 16 GB@3200MHz | GPU: Nvidia GTX 1080 Ti FE | Case: Corsair Crystal 570X (black) | PSU: EVGA Supernova G2 1000W | Monitor: Asus VG248QE 24"

Laptop: Dell XPS 13 9370 | CPU: i5 10510U | RAM: 16 GB

Server: CPU: i5 4690k | RAM: 16 GB | Case: Corsair Graphite 760T White | Storage: 19 TB

Link to comment
Share on other sites

Link to post
Share on other sites

@tikker

 

image.thumb.png.db2b0ddbdffc7c9fa044338da6daac7b.png

 

 

All 26 are on the screen.

Microsoft owns my soul.

 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

@tikker

 

Also for mason, In "ALL", I have installed clangd, codelldb, cpplint, cpptools, lua-language server.
In "LSP", clangd and lua language server.

In "DAP", codelldb and cpptools.

In "Linter", cpplint
And nothing for formatter.

Microsoft owns my soul.

 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

11 hours ago, Gat Pelsinger said:

@tikker

 

image.thumb.png.db2b0ddbdffc7c9fa044338da6daac7b.png

 

 

All 26 are on the screen.

Okay, so stuff seems to be running. First I would try: open one of your source files and run :checkhealth and :LspInfo to see if things are good. The checkhealth command will show a general overview of configuration and whether any errors are found there. LspInfo will tell you what kind of file it has detected, the servers you have configured and whether any LSP's are active for the file.

Crystal: CPU: i7 7700K | Motherboard: Asus ROG Strix Z270F | RAM: GSkill 16 GB@3200MHz | GPU: Nvidia GTX 1080 Ti FE | Case: Corsair Crystal 570X (black) | PSU: EVGA Supernova G2 1000W | Monitor: Asus VG248QE 24"

Laptop: Dell XPS 13 9370 | CPU: i5 10510U | RAM: 16 GB

Server: CPU: i5 4690k | RAM: 16 GB | Case: Corsair Graphite 760T White | Storage: 19 TB

Link to comment
Share on other sites

Link to post
Share on other sites

@tikker You should definitely check into the images, but I posted on reddit about this and you might want to check their reply and I have a question on that, so it might be a clue.

 

Microsoft owns my soul.

 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, Gat Pelsinger said:

@tikker

<snip>

Ok everything seems running and healthy, and clangd is recognised.

 

1 hour ago, Gat Pelsinger said:

@tikker You should definitely check into the images, but I posted on reddit about this and you might want to check their reply and I have a question on that, so it might be a clue.

Seems like you need to generate that compile_commands.json file that they linked instructions for. I would try that next.

Crystal: CPU: i7 7700K | Motherboard: Asus ROG Strix Z270F | RAM: GSkill 16 GB@3200MHz | GPU: Nvidia GTX 1080 Ti FE | Case: Corsair Crystal 570X (black) | PSU: EVGA Supernova G2 1000W | Monitor: Asus VG248QE 24"

Laptop: Dell XPS 13 9370 | CPU: i5 10510U | RAM: 16 GB

Server: CPU: i5 4690k | RAM: 16 GB | Case: Corsair Graphite 760T White | Storage: 19 TB

Link to comment
Share on other sites

Link to post
Share on other sites

@tikker

 

If you know anything about compile_commands, then is it possible to write it by hand? Because generating is another a whole hassle, because you know, I am a Windows user and everything there is configured for Linux. I am looking to use Bear but seems like I need to compile it. I am obviously getting more errors like "nmake was not found". And upon researching I found out that is only available in Visual Studio or whatever, like it's an absolute mess. If you have some time, kindly just take a little peek and give me at least some idea of what I should be doing. https://clangd.llvm.org/installation#project-setup

Microsoft owns my soul.

 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

56 minutes ago, Gat Pelsinger said:

@tikker

 

If you know anything about compile_commands, then is it possible to write it by hand? Because generating is another a whole hassle, because you know, I am a Windows user and everything there is configured for Linux. I am looking to use Bear but seems like I need to compile it. I am obviously getting more errors like "nmake was not found". And upon researching I found out that is only available in Visual Studio or whatever, like it's an absolute mess. If you have some time, kindly just take a little peek and give me at least some idea of what I should be doing. https://clangd.llvm.org/installation#project-setup

I don't know anything about that file, sorry. I don't program in C, so I never have to deal with setting it up. That page does link to another one where the spec for that file is defined: https://clang.llvm.org/docs/JSONCompilationDatabase.html It seems clang with the -MJ argument might be able to generate it? It's not uncommon for this stuff to be more linux oriented (or linux first), so outside of IDE's liek Visual Studio or VS Code you may be pulling at the short end of the stick a bit with trying it on Windows.

Crystal: CPU: i7 7700K | Motherboard: Asus ROG Strix Z270F | RAM: GSkill 16 GB@3200MHz | GPU: Nvidia GTX 1080 Ti FE | Case: Corsair Crystal 570X (black) | PSU: EVGA Supernova G2 1000W | Monitor: Asus VG248QE 24"

Laptop: Dell XPS 13 9370 | CPU: i5 10510U | RAM: 16 GB

Server: CPU: i5 4690k | RAM: 16 GB | Case: Corsair Graphite 760T White | Storage: 19 TB

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×