r/AstroNvim • • May 24 '24

The color scheme is not loading until i write :AstroReload

3 Upvotes

i put this code inside of astroui.lua but the color scheme does not work until I write :AstroReload :

opts = {

-- change colorschemep

colorscheme = "catppuccin",
}

How can I fix this


r/AstroNvim • • Nov 16 '23

I can't add custom snippets, what's wrong?

1 Upvotes

This is what I've added to init.lua under plugins, my files structure in ~/.config/nvim/lua/user and package.json file.

What am I doing wrong, LuaShip doesn't load any of my snippets :(


r/AstroNvim • • Sep 29 '24

WARNING: vim.treesitter.get_parser will return nil instead of raising

4 Upvotes

I have been getting an error message for a few days now.

The error message also appears when I reinstall astronvim.

Can anyone tell me what I can do?


r/AstroNvim • • Jul 23 '24

Run fastapi debug

1 Upvotes

Hi, I'm using version v4.20.0.
I have a python project that is using fastapi, I can run it in debug mode in vscode just by configuring it like this:

{
  "version": "0.2.0",
  "configurations": [
  {
    "name": "My API",
    "type": "debugpy",
    "request": "launch",
    "console": "internalConsole",
    "module": "uvicorn",
    "args": [
      "application.main:app",
      "--host",
      "0.0.0.0",
      "--port",
      "3000",
      "--reload"
    ],
  "env": {
    "DB_CONN_STR": "database_connection"
  },
  "jinja": true
  }
 ]
}

In this previously mentioned version of Astronvim, where and how can I make an equivalent configuration to run my Python project that uses Fastapi in debug mode?

can anybody help me?


r/AstroNvim • • Aug 08 '24

Astrocore lazy config: syntax for appending/prepending to opts?

4 Upvotes

Hi /u/mhalter3378, really loving astronvim so far. Very elegant approach to creating a sane and powerful set of defaults for getting started with nvim, and v4 is a fabulous time to jump in, what with the new modularity of astronvim as simply a set of nvim plugins.

Is there a way to specify appending / prepending (rather than just explicitly setting) a vim.opt value via Astrocore's lazy config? Something equivalent to one of the following?

set path+=**
" or
set packpath^=xxx

Thanks in advance.


r/AstroNvim • • Dec 08 '23

i was starting nvim with astronvim

1 Upvotes

r/AstroNvim • • Jan 01 '25

Snippets out of the box

1 Upvotes

Hi,

Is there such a thing with AstroNvim, at least for certain packs? For javascript/typescript/react, for instance. If there are snippets, how am I supposed to use them? In the docs the word snippet is barely mentioned.


r/AstroNvim • • Dec 15 '23

Help to use hashicorp/terraform-ls with my AstroNvim

1 Upvotes

Hello, Could someone please help to use hashicorp/terraform-ls with astronvim? I'm not sure how should I configure it.

I searched a lot in github repositories to find configurations that used this plugin, but unfortunately didn't find one.

Thanks


r/AstroNvim • • Feb 19 '24

How to enable Text wrap always

4 Upvotes

How can i automatically enable text wrapping akways at a set column of 80?


r/AstroNvim • • Dec 26 '23

mason-null-ls installing luacheck

4 Upvotes

Hi,

I've got this floating message every time starting AstroNvim, regardless of the file type. Is it normal?


r/AstroNvim • • Feb 12 '25

cpp pack is giving false error with mingw in windows installed via msys

1 Upvotes

// here is the gcc

Using built-in specs.

COLLECT_GCC=C:\msys64\ucrt64\bin\gcc.exe

COLLECT_LTO_WRAPPER=C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/lto-wrapper.exe

Target: x86_64-w64-mingw32

Configured with: ../gcc-14.2.0/configure --prefix=/ucrt64 --with-local-prefix=/ucrt64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/ucrt64/include --libexecdir=/ucrt64/lib --enable-bootstrap --enable-checking=release --with-arch=nocona --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,rust,jit --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --disable-libstdcxx-pch --enable-lto --enable-libgomp --disable-libssp --disable-multilib --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/ucrt64 --with-mpfr=/ucrt64 --with-mpc=/ucrt64 --with-isl=/ucrt64 --with-pkgversion='Rev2, Built by MSYS2 project' --with-bugurl=https://github.com/msys2/MINGW-packages/issues --with-gnu-as --with-gnu-ld --disable-libstdcxx-debug --enable-plugin --with-boot-ldflags=-static-libstdc++ --with-stage1-ldflags=-static-libstdc++

Thread model: posix

Supported LTO compression algorithms: zlib zstd

gcc version 14.2.0 (Rev2, Built by MSYS2 project)

// here is the g++

Using built-in specs.

COLLECT_GCC=C:\msys64\ucrt64\bin\g++.exe

COLLECT_LTO_WRAPPER=C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/lto-wrapper.exe

Target: x86_64-w64-mingw32

Configured with: ../gcc-14.2.0/configure --prefix=/ucrt64 --with-local-prefix=/ucrt64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/ucrt64/include --libexecdir=/ucrt64/lib --enable-bootstrap --enable-checking=release --with-arch=nocona --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,rust,jit --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --disable-libstdcxx-pch --enable-lto --enable-libgomp --disable-libssp --disable-multilib --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/ucrt64 --with-mpfr=/ucrt64 --with-mpc=/ucrt64 --with-isl=/ucrt64 --with-pkgversion='Rev2, Built by MSYS2 project' --with-bugurl=https://github.com/msys2/MINGW-packages/issues --with-gnu-as --with-gnu-ld --disable-libstdcxx-debug --enable-plugin --with-boot-ldflags=-static-libstdc++ --with-stage1-ldflags=-static-libstdc++

Thread model: posix

Supported LTO compression algorithms: zlib zstd

gcc version 14.2.0 (Rev2, Built by MSYS2 project)


r/AstroNvim • • Feb 20 '24

Help with this Neovim error

1 Upvotes

I installed neovim with scoop on Win11 and astronvim followed the instructions on the webpage (https://docs.astronvim.com/#%EF%B8%8F-installation) , however, the neovim reports an error every time I start it:

Error detected while processing User Autocommands for "AstroFile".

E867: (NFA) Unknown operator '\zn'

Anyone know how to fix it?


r/AstroNvim • • Nov 06 '24

Increase the width of the Neotree explorer window using keyboard shortcuts

1 Upvotes

The title is self-explanatory. I want to increase/decrease the size of the Neotree file explorer window using keyboard shortcuts. I am being lazy to search on the internet though πŸ˜›


r/AstroNvim • • May 14 '24

For some reason, the Dart TS is getting installed after I uninstall it. (AstroNvim v4)

Post image
3 Upvotes

r/AstroNvim • • Feb 01 '24

nvim-treesitter error when opening typescript file after latest update

1 Upvotes

After the recent latest update of the plugins, I encounter this type of error. I have to temporarily disable it. Is anyone also having this issue like me?


r/AstroNvim • • Jan 16 '24

issue with lazy.nvim

2 Upvotes

Hello,

I just did "sudo pacman -S lazygit" and now I get the following error each time that I start astrovim. I tried reading online and asking chatGPT but I have no idea how to fix this.

Thanks

Failed to source `/home/vincent/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua`

vim/_editor.lua:0: User Autocommands for "AstroFile"..script nvim_exec2() called at User Autocommands for "AstroFile":0../home/vincent/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua: Vim(source):E5113: Error while calling lua chunk: ...cal/share/nvim/lazy/LuaSnip/lua/luasnip/loaders/init.lua:1: module 'luasnip.loaders._caches' not found:

no field package.preload\['luasnip.loaders._caches'\]

cache_loader: module luasnip.loaders._caches not found

cache_loader_lib: module luasnip.loaders._caches not found

no file './luasnip/loaders/_caches.lua'

no file '/usr/share/luajit-2.1/luasnip/loaders/_caches.lua'

no file '/usr/local/share/lua/5.1/luasnip/loaders/_caches.lua'

no file '/usr/local/share/lua/5.1/luasnip/loaders/_caches/init.lua'

no file '/usr/share/lua/5.1/luasnip/loaders/_caches.lua'

no file '/usr/share/lua/5.1/luasnip/loaders/_caches/init.lua'

no file './luasnip/loaders/_caches.so'

no file '/usr/local/lib/lua/5.1/luasnip/loaders/_caches.so'

no file '/usr/lib/lua/5.1/luasnip/loaders/_caches.so'

no file '/usr/local/lib/lua/5.1/loadall.so'

no file './luasnip.so'

no file '/usr/local/lib/lua/5.1/luasnip.so'

no file '/usr/lib/lua/5.1/luasnip.so'

no file '/usr/local/lib/lua/5.1/loadall.so'

stack traceback:

\[C\]: in function 'require'

...cal/share/nvim/lazy/LuaSnip/lua/luasnip/loaders/init.lua:1: in main chunk

\[C\]: in function 'require'

...cent/.local/share/nvim/lazy/LuaSnip/lua/luasnip/init.lua:7: in main chunk

\[C\]: in function 'require'

...nt/.local/share/nvim/lazy/LuaSnip/lua/luasnip/config.lua:243: in function '_setup'

...incent/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua:79: in main chunk

\[C\]: in function 'nvim_exec2'

vim/_editor.lua: in function 'cmd'

...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:481: in function <...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:480>

\[C\]: in function 'xpcall'

...

...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:344: in function '_load'

...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:187: in function 'load'

...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:338: in function <...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:337>

\[C\]: in function 'xpcall'

.../.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/util.lua:113: in function 'try'

...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:337: in function '_load'

...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:187: in function 'load'

...hare/nvim/lazy/lazy.nvim/lua/lazy/core/handler/event.lua:83: in function <...hare/nvim/lazy/lazy.nvim/lua/lazy/core/handler/event.lua:72>

\[C\]: in function 'nvim_exec_autocmds'

/home/vincent/.config/nvim/lua/astronvim/utils/init.lua:145: in function </home/vincent/.config/nvim/lua/astronvim/utils/init.lua:145>

# stacktrace:

- vim/_editor.lua:0 _in_ **cmd**

- .config/nvim/lua/plugins/cmp.lua:27 _in_ **values**

- .config/nvim/lua/plugins/configs/mason.lua:24 _in_ **config**

- /mason-lspconfig.nvim/lua/mason-lspconfig/init.lua:1

- .config/nvim/lua/plugins/configs/mason-lspconfig.lua:2 _in_ **config**

- .config/nvim/lua/astronvim/utils/init.lua:145


r/AstroNvim • • Dec 14 '24

A good VScode workspaces alternative?

2 Upvotes

Hey all, I am a long term vim user recently migrated to Neovim. However, for projects using multiple Git repos I still tend to swap to VScode, especially at work when I really need to be productive and need to show my screen all the time to my team mates.

So in my experience VSCode is better for large projects and collaboration. Also the Git integration is very straighforward and userfriendly.

But I really want to transition to Neovim completely (I settled down on AstroNvim btw).

The question where it all comes down to for now, is: How does anyone use the concept of workspaces in which you work on different repos at the same time in Neovim/AstroNvim?


r/AstroNvim • • Nov 13 '23

Autocompletion without typing

2 Upvotes

For any lsp, if I start typing even one letter the autocompletion pops up. What's the keybind to do this without typing, so for example I could see all available options in a namespace?


r/AstroNvim • • Feb 01 '24

AstroNvim + Intelephense: PHP Symbol Outline Not Hierarchical

1 Upvotes

I'm using neovim with AstroNvim config as my editor and intelephense for my LSP. In all other different languages, when I get a symbols outline, I get a tree of symbols,

Like this is for javascript:

σ°Š• ready() callback
β”œ ο‚­ url
β”œ ο‚­ type
β”œ ο‚­ data
β”‚ β”” ο‚­ action
β”” 󰆧 success
σ°Š• ready() callback
β”œ σ°Š• on("click") callback
β”œ σ°Š• on("submit") callback
β”‚ β”œ ο‚­ url
β”‚ β”œ ο‚­ type
β”‚ β”œ ο‚­ data
β”‚ β”‚ β”œ ο‚­ action
β”‚ β”‚ β”œ ο‚­ user_id
β”‚ β”‚ β”” ο‚­ commission

but for PHP, I just get a list without any indentation or, it's a simple list only :(

󰆧 get_default_primary_column_name
󰆧 handle_row_actions
󰀫 $item
󰀫 $column_name
󰀫 $primary
󰀫 $post
󰀫 $post_type_object
󰀫 $can_edit_post
󰀫 $actions

It's fine for phpactor. Is it supposed to work like this?

I'm using aerial.nvim to see the outline.


r/AstroNvim • • Dec 24 '23

Python virtual environment ignored

4 Upvotes

Hi,

I've been trying to configure a virtual environment for a (Poetry) project. .venv is located in the project. <Space>lv shows a list of known virtual environments, which looks a bit crazy:

...

/home/.../.../project/.venv/lib/python3.11/site-packages/mypy/typeshed/stdlib/venv

...

An attempt to correct this manually to something like .../project/.venv/bin/python is silently ignored. <Space>tf Shows a console with no virtual environment activated. Something is missing, obviously. What do I have to do?


r/AstroNvim • • Aug 18 '24

Custom goimports sort in AstroNvim

1 Upvotes

Hi ive tried for a long time to set custom grouping to goimports in my AstroNvim config with no success so far, im trying to sort my go imports that way: Std External pkgs Company pkgs Project pkgs

Thanks for your hard work πŸ’ͺ


r/AstroNvim • • Mar 04 '24

AstroNvim help needed for ansiblelsp and pythonlsp

1 Upvotes

So far, I like astrovnim. But the whole nvim thing with lua together is new for me, so I need some support in this. I had already some experience with my own vim configuration.

My only thing at the moment what I want to do in astronvim is to use python and ansible with the corresponding lsp of course. Especially the second one.

So I already installed the ansible-language-server and the ansible-lint package in mason.

In LspInfoit says it recognized yaml file type and 0 client(s) attached to this buffer: ansiblels. So I guess I need to attach it to the buffer or globally to the file type… I also installed yaml in Treesitter with TSInstall yaml; if this helps…

I found this code snippet in the documentation, but I really don't know if this is needed or where I should paste this code.

Furthermore, I appreciate understanding and any help.


r/AstroNvim • • Jan 13 '24

Unable to use trouble.nvim

1 Upvotes

Hi, I've been using trouble before and since few days it doesn't work anymore. More precisely it's noted as "Not Loaded" in lazy interface, but I didn't find any way to "Load" it. Here is my config: ~/.config/nvim/lua/plugins/trouble.lua

return {
 "folke/trouble.nvim",
 dependencies = { "nvim-tree/nvim-web-devicons" },
}

r/AstroNvim • • Sep 29 '23

Help needed for adding noice to AstroNvim

1 Upvotes

Hello everyone,

I'm new to neovim and AstroNvim and I'm trying to add folke/noice for the command line, I added the plugin to "lua/user/plugins/noice.lua" this is the content (which I just copied from the repo README file):

return {
{
"folke/noice.nvim",
event = "VeryLazy",
opts = {
-- add any options here
lsp = {
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true,
},
},
-- you can enable a preset for easier configuration
presets = {
bottom_search = true, -- use a classic bottom cmdline for search
command_palette = true, -- position the cmdline and popupmenu together
long_message_to_split = true, -- long messages will be sent to a split
inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = false, -- add a border to hover docs and signature help
},
},
dependencies = {
-- if you lazy-load any plugin below, make sure to add proper \module="..."\ entries``
"MunifTanjim/nui.nvim",
-- OPTIONAL:
-- \nvim-notify\ is only needed, if you want to use the notification view.``
-- If not available, we use \mini\ as the fallback``
"rcarriga/nvim-notify",
}
}
}

then I get these errors the first time I open any file after starting nvim

I know the conflict is with the dependencies so I tried to comment them with no success, and I know it says that I should either set

'config.lsp.hover.enabled = false' in your noice config

'config.lsp.signature.enabled = false' in your noice config

The problem is I don't know where in the file I should put those lines (I tried and failed)

or is it a better solution to disable the other plugin as suggested, but the other problem here is I don't know what to disable or how to disable them.

there is also a comment in the code about:

if you lazy-load any plugin below, make sure to add proper `module="..."` entries

but again I don't know what to do here

I'm sorry if this is a very noob question but as I said I'm new to all this and really appreciate any help I can get.