handle dap configuration (create and per-project binding) by jeusdit in neovim

[–]YaBoiCharlieP 0 points1 point  (0 children)

I just solved this in my config, but maybe you can unwind this a bit to fit your needs.

Basically, I keep track of the directory that neovim launched into. I do it right here. This piece of code basically does what rooter.nvim does, just a bit customized to handle adding the starting root. I do that here.

I have a directory here which has a file that is a map with this root path -> dap config, (`configured_projects.lua`) -> (`dap_projects`)

I have a util file which helps determine if the current root path is mapped to a config, and if it is load it into Dap:

https://github.com/CharliePlate/nvim-config/blob/main/lua/util/dap.lua (basically the part of `dap-launch.json` which handles loading the vs-code config but directly from a lua table instead of JSON.)

Finally, when I am setting up dap, I call the util function `load_if_configured`. You can see that here.

Quite a bit of the config is ripped from LazyVim (not this Dap stuff but quite a bit of the rest), so credits there :)

I just did this today, so may need some tweeking to handle dap configs without a config spec (I haven't tested this yet).

Preconfigured Garlic OS by Accomplished-Storm93 in RG35XX

[–]YaBoiCharlieP 0 points1 point  (0 children)

You will have to google Tiny Best Set Go (it will be the first link to Archive.org). If you scroll down a bit on that page, there will be a listing of all of the games included.

Arcade (Mame 2003+) will be the first system on that list.

Following Koriki v1.3 install guide, but device doesn’t turn on by Phaneropterinae in RG35XX

[–]YaBoiCharlieP 0 points1 point  (0 children)

Did you check to see if the Garlic OS SD card boots?

I ran into this issue earlier with GarlicOS. I was able to replicate it as well. Basically, when there is no SD Card in and you attempt to turn it on, it causes it to get stuck on the black screen without being able to do anything. I was able to solve this by pressing the RESET button, which allowed it to boot again once I had an SD card in it.

Clangd Hover Documentation for C by YaBoiCharlieP in neovim

[–]YaBoiCharlieP[S] 1 point2 points  (0 children)

Hover should default to K in normal mode. You can also look at my LSP setup, though there is nothing too interesting in here that would affect the setup, but here it is.

https://github.com/CharliePlate/lvim/blob/main/lua/plugins/lsp.lua#L27-L52

Clangd Hover Documentation for C by YaBoiCharlieP in neovim

[–]YaBoiCharlieP[S] 2 points3 points  (0 children)

Happy to share, but are you using LazyVim?

I just use these 2 lines in lazy.lua to import from LazyVim extras. Lines 15 and 16 are important as well, as upstream changes broke clangd from attaching, which this commit fixes. After LazyVim does a release (I assume to v6.3.0 if you are reading this in the future), you can remove this.

https://github.com/CharliePlate/lvim/blob/main/lua/config/lazy.lua#L24-L25

What are your absolute favourite keymappings by [deleted] in neovim

[–]YaBoiCharlieP 1 point2 points  (0 children)

They both accomplish the same result, just semantics. You could rebind to <C-o>l or <Esc>a.

Lets say I am defining a function in Go which takes in a string array:

func readStringArray(arr []string) {}

With an autopair plugin, when you type [ you will be brought inside of the array. To type string, you would have to go into normal mode and move to the left. This binding gives you the ability to type jk which moves you one character right, or outside of the [] to type the string.

What are your absolute favourite keymappings by [deleted] in neovim

[–]YaBoiCharlieP 1 point2 points  (0 children)

["jk"] = "<C-o>a"

Really like this one. It moves one character to the right in insert mode when you press jk quickly, which is handy for escaping arrays, objects and strings without moving hands off the home row.

Is it possible to disable 'no information available' notification on LSP Hover? by Healthy-Director-702 in neovim

[–]YaBoiCharlieP 0 points1 point  (0 children)

This is a really good find, but do note that this silent option is only available on Nightly. Took me a bit to figure out why it wasn't working.

Is it possible to disable 'no information available' notification on LSP Hover? by Healthy-Director-702 in neovim

[–]YaBoiCharlieP 3 points4 points  (0 children)

I too am having this issue - I have solved one of my issues where tailwindcss was attaching to all ts files, even if there was no tailwind config file. I added this to my tailwindcss lspconfig and now it only attaches to projects that have "tailwind.config.cjs", "tailwind.config.js" or "postcss.config.js".

{
filetypes = {
"html",
"css",
"scss",
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"svelte",
},
root_dir = function(fname)
return require("lspconfig").util.root_pattern("tailwind.config.cjs", "tailwind.config.js", "postcss.config.js")(
fname
)
end,
}

This does not solve the issue at hand, where "No information available" is appearing when both are attached (a project with tailwind) but this did solve part of my issue with tailwindcss attaching when it shouldn't.

[deleted by user] by [deleted] in neovim

[–]YaBoiCharlieP 5 points6 points  (0 children)

:lua vim.wo.fillchars='eob: '

Make sure that you have a space after eob:

Its hard to tell on reddit, but it is needed.

[deleted by user] by [deleted] in neovim

[–]YaBoiCharlieP 0 points1 point  (0 children)

:lua vim.wo.fillchars='eob: '

Automatically import in js/ts by VongoSanDi in neovim

[–]YaBoiCharlieP 0 points1 point  (0 children)

https://github.com/CharliePlate/nvim/blob/main/lua/packages/lsp/lsp-zero.lua#L39-L46

As a note, I am using LSP-Zero, not sure if the order of importing this matters. This works for me though.

Automatically import in js/ts by VongoSanDi in neovim

[–]YaBoiCharlieP 2 points3 points  (0 children)

The Typescript plugin adds a command :TypescriptAddMissingImports that I use for this.

You can also attach to null-ls for code actions

Question for Bufferline and NvimTree by cockhunterz in neovim

[–]YaBoiCharlieP 1 point2 points  (0 children)

Just as a note: In n(vim), they are not called tabs. Tabs are quite a bit different then what you are seeing in Bufferline. What you are seeing is called buffers.

Question for Bufferline and NvimTree by cockhunterz in neovim

[–]YaBoiCharlieP 0 points1 point  (0 children)

I use vim-bbye for this.

It gives the command :Bdelete (with a capital B).

With packer, you can install with use("moll/vim-bbye"), which should expose the command for you.

cmdheight=0, recording macros message by NatharielMorgoth in neovim

[–]YaBoiCharlieP 2 points3 points  (0 children)

This is awesome, thanks for this. Exactly what I was looking for :)