Giter Site home page Giter Site logo

astronvim / astrocommunity Goto Github PK

View Code? Open in Web Editor NEW
945.0 17.0 184.0 1.65 MB

A community repository of common plugin specifications

License: GNU General Public License v3.0

Lua 100.00%
lua neovim astronvim astrovim lazy lazynvim hacktoberfest neovim-lua-plugin neovim-plugin

astrocommunity's Introduction

AstroNvim



AstroNvim is an aesthetically pleasing and feature-rich neovim config that is extensible and easy to use with a great set of plugins

🌟 Preview

Preview Image

✨ Features

⚡ Requirements

[!NOTE] > [1] All downloadable Nerd Fonts contain icons which are used by AstroNvim. Install the Nerd Font of your choice to your system and in your terminal emulator settings, set its font face to that Nerd Font. If you are using AstroNvim on a remote system via SSH, you do not need to install the font on the remote system.

[!NOTE] > [2] Note when using default theme: For MacOS, the default terminal does not have true color support. You will need to use iTerm2, Kitty, WezTerm, or another terminal emulator that has true color support.

🛠️ Installation

AstroNvim is provided as a plugin that can be installed with the lazy.nvim plugin manager and then used to import all of the plugin configurations that AstroNvim provides. To quickly get started it is recommended to start with the official AstroNvim Template which provides a great starting point for a new AstroNvim based configuration.

Linux/Mac OS (Unix)

Make a backup of your current nvim and shared folder

mv ~/.config/nvim ~/.config/nvim.bak
mv ~/.local/share/nvim ~/.local/share/nvim.bak
mv ~/.local/state/nvim ~/.local/state/nvim.bak
mv ~/.cache/nvim ~/.cache/nvim.bak

Clone the template repository

git clone --depth 1 https://github.com/AstroNvim/template ~/.config/nvim
rm -rf ~/.config/nvim/.git
nvim

Windows (Powershell)

Make a backup of your current nvim and nvim-data folder

Rename-Item -Path $env:LOCALAPPDATA\nvim -NewName $env:LOCALAPPDATA\nvim.bak
Rename-Item -Path $env:LOCALAPPDATA\nvim-data -NewName $env:LOCALAPPDATA\nvim-data.bak

Clone the repository

git clone --depth 1 https://github.com/AstroNvim/template $env:LOCALAPPDATA\nvim
Remove-Item $env:LOCALAPPDATA\nvim\.git -Recurse -Force
nvim

Minimal ~/.config/nvim/init.lua

Some user's might not want to use an entire template or do any customization. Here is a minimal ~/.config/nvim/init.lua file that simply set's up a base AstroNvim installation:

local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
  -- stylua: ignore
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup { "AstroNvim/AstroNvim", version = "^4", import = "astronvim.plugins" }

📦 Basic Setup

Install LSP

Enter :LspInstall followed by the name of the server you want to install
Example: :LspInstall pyright

Install language parser

Enter :TSInstall followed by the name of the language you want to install
Example: :TSInstall python

Install Debugger

Enter :DapInstall followed by the name of the debugger you want to install
Example: :DapInstall python

Manage plugins

Run :Lazy check to check for plugin updates

Run :Lazy update to apply any pending plugin updates

Run :Lazy clean to remove any disabled or unused plugins

Run :Lazy sync to update and clean plugins

Update AstroNvim Packages

Run :AstroUpdate (<leader>pa) to update both Neovim plugins and Mason packages

🗒️ Links

📹 Videos

There have been some great review videos released by members of the community! Here are a few:

🚀 Contributing

If you plan to contribute, please check the contribution guidelines first.

⭐ Credits

Sincere appreciation to the following repositories, plugin authors and the entire neovim community out there that made the development of AstroNvim possible.

Lua

astrocommunity's People

Contributors

0xricksanchez avatar 20k-ultra avatar astronvimbot avatar chaozwn avatar dsisnero avatar fynnfluegge avatar gacallea avatar jay-babu avatar khaneliman avatar luxus avatar manuuurino avatar mehalter avatar owittek avatar rafaelderolez avatar rayjameson avatar rozhelluk avatar sacro avatar sjcobb2022 avatar souravpakhira avatar std-enigma avatar subjective avatar taskylizard avatar thesast avatar tku137 avatar utkarshgupta137 avatar uzaaft avatar whitemoon avatar windowsrefund avatar ypli0629 avatar zeioth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

astrocommunity's Issues

bug: true-zen.nvim plugin - true-zen not found error

Importing true-zen.nvim plugin via the astrocommunity generates the error true-zen not found

The true-zen-nvim plugin was added to the community.lua file

  { import = "astrocommunity.editing-support.true-zen-nvim" },

AstroNvim 3.17.0 is being used, on Ubuntu Linux 22.04

I did not find any similar issues in the Pocco81/true-zen.nvim repository.

The full error shown when starting AstroNvim

Error detected while processing /home/practicalli/.config/astronvim/init.lua:                                                                              
Failed to load `astrocommunity.editing-support.true-zen-nvim.true-zen-nvim`                                                                                
                                                                                                                                                           
...ommunity/editing-support/true-zen-nvim/true-zen-nvim.lua:13: module 'true-zen' not found:                                                               
^Ino field package.preload['true-zen']                                                                                                                     
cache_loader: module true-zen not found                                                                                                                    
cache_loader_lib: module true-zen not found                                                                                                                
^Ino file './true-zen.lua'                                                                                                                                 
^Ino file '/__w/neovim/neovim/.deps/usr/share/luajit-2.1.0-beta3/true-zen.lua'                                                                             
^Ino file '/usr/local/share/lua/5.1/true-zen.lua'                                                                                                          
^Ino file '/usr/local/share/lua/5.1/true-zen/init.lua'                                                                                                     
^Ino file '/__w/neovim/neovim/.deps/usr/share/lua/5.1/true-zen.lua'                                                                                        
^Ino file '/__w/neovim/neovim/.deps/usr/share/lua/5.1/true-zen/init.lua'                                                                                   
^Ino file './true-zen.so'                                                                                                                                  
^Ino file '/usr/local/lib/lua/5.1/true-zen.so'                                                                                                             
^Ino file '/__w/neovim/neovim/.deps/usr/lib/lua/5.1/true-zen.so'                                                                                           
^Ino file '/usr/local/lib/lua/5.1/loadall.so'                                                                                                              
                                                                                                                                                           
# stacktrace:                                                                                                                                              
  - /astrocommunity/lua/astrocommunity/editing-support/true-zen-nvim/true-zen-nvim.lua:13                                                                  
  - .config/astronvim/lua/astronvim/lazy.lua:34                                                                                                            
  - .config/astronvim/init.lua:8                          

Directly adding the package without the astrocommunity import does not generate the error and the true-zen commands are available and work.

  {
    "Pocco81/true-zen.nvim",
    lazy = false,
    opts = {
      integrations = {
        kitty = {
          -- increment font size in Kitty.
          -- `allow_remote_control socket-only` and `listen_on unix:/tmp/kitty` in kitty config
          enabled = true,
          font = "+4",
        },
      },
    },
  },

I am using zen-mode.nvim instead, from the AstroCommunity, which works without issue.

add typescript pack for denols and tsserver + denols

Currently AstroNvim offers a convenient minimal configuration to enable/disable tsserver, denols & prettierd based on the current project by identifying existing config files as described just just below the deno-nvim setup. I think adding a separate pack for denols as well as tsserver + denols would be really useful for a lot of people who work on multiple typescript projects.

Document debugging rust with codelldb

I think it would be helpful for the rust language pack readme to include a code snippet on debugging with codelldb instead of lldb-vscode. Something like the one on this page from the the rust-tools wiki, but adapted to work with the rust language pack.

gopls not attached on go file

Checklist

  • Using a stable version of Neovim (i.e. not neovim nightly)
  • :AstroUpdate
  • Restarted AstroNvim

Operating system/version

macOS 12.6.1

Terminal/GUI

iTerm2

AstroNvim Health

AstroNvim

  • INFO: AstroNvim Version: v3.2.0
  • INFO: Neovim Version: v0.8.3
  • OK: Using stable Neovim >= 0.8.0
  • OK: git is installed: Used for core functionality such as updater and plugin management
  • OK: open is installed: Used for gx mapping for opening files with system opener (Optional)
  • OK: lazygit is installed: Used for mappings to pull up git TUI (Optional)
  • OK: node is installed: Used for mappings to pull up node REPL (Optional)
  • WARNING: gdu is not installed: Used for mappings to pull up disk usage analyzer (Optional)
  • WARNING: btm is not installed: Used for mappings to pull up system monitor (Optional)
  • OK: python is installed: Used for mappings to pull up python REPL (Optional)

Describe the bug

gopls is not attached to a go buffer. Does not happen when on AstroNvim 2.*

Steps to Reproduce

  1. install astronvim
  2. use user_example config https://github.com/AstroNvim/user_example/
  3. add pack.go community setting
  4. let it install necessary plugins
  5. open go file

Expected behavior

gopls attached

Screenshots

Screenshot 2023-03-15 at 15 01 49

Additional Context

tried using AstroNvim 3.0 with community config

Not sure if it matters, but in configs/lspconfig.lua file, it returns function(_, _) instead of function (_, opts) like the other files

DAP pack in astrocommunity.pack.typescript is missing typescript dap support

I have this error with the typescript pack:

Error executing luv callback:
.../.local/share/nvim/lazy/nvim-dap/lua/dap/session.lua:1187: adapter.port is required for server adapter
stack traceback:
	[C]: in function 'assert'
	.../.local/share/nvim/lazy/nvim-dap/lua/dap/session.lua:1187: in function <.../.local/share/nvim/lazy/nvim-dap/lua/dap/session.lua:1179>

I already deleted ~/.cache/nvim and ~/.local/nvim and performed a very clean installation and the same error happens.

The adapter is being executed:

image

Due to this, if I try again after executing the debug the first time, it fails with another error saying there is already another process running (which makes sense...)

Any ideas what could be wrong?

Rust debugger not working on Windows

Hi,

I enabled the rust community package user/plugins/community.lua:

return {
  "AstroNvim/astrocommunity",
  { import = "astrocommunity.pack.rust" },
}

added user/plugins/nvim_dap.lua:

return {
  {
    "mfussenegger/nvim-dap", -- for debbugging
    enabled = true,
  }
}

but when I try to run RustDebuggables I get the next error "ENOENT: no such file or directory"
rustdebuggable_error

Something that I noticed is that the rust community package downloads the codelldb in:

codelldb_path = "/extension/adapter/codelldb.exe"
liblldb_paht = "/extension/lldb/lib/liblldb.lib"

Instead of:

codelldb_path = "/codelldb"
liblldb_paht = "/extension/lldb/lib/liblldb"

So I manually edited the rust.lua file to match the right path in windows. Now nvim is able to run codelldb but then I get this error ECCONNREFUSED:
dap_error_01

Is there anything I can do to make this work?
If so then I can contribute updating the rust pack to check if the system is running windows and if so to point to the right directory.

Thanks in advance!

Java Language Pack

I think that adding a java language pack (using nvim-jdtls) would be a great addition to the community packages.

The default recommended settings for jdtls should be a good example.

I don't currently have a sample, however the other language packs area already a good example, and nvim-jdtls has a solid base config.

It would also be good to install a valid formatter, as jdtls does not have very good formatting on it's own.

Add a README to each plugin

          The readme should have a link to the plugin repo,a field for a maintainer, and configuration notes

Originally posted by @luxus in #16 (comment)

We should have a README for each plugin with some basic information about it

Improved category structure

Perhaps it would be better to add a single README.md file listing the plugins and information about them in the category folder where possible?
I can do that and send a pull request.

adding neotest

   {
    "nvim-neotest/neotest",
    config = function()
      -- get neotest namespace (api call creates or returns namespace)
      local neotest_ns = vim.api.nvim_create_namespace "neotest"
      vim.diagnostic.config({
        virtual_text = {
          format = function(diagnostic)
            local message = diagnostic.message:gsub("\n", " "):gsub("\t", " "):gsub("%s+", " "):gsub("^%s+", "")
            return message
          end,
        },
      }, neotest_ns)
      require("neotest").setup {
        -- your neotest config here
        adapters = {
          require "neotest-go",
          require "neotest-rust",
          require "neotest-python",
        },
      }
    end,
    ft = { "go", "rust", "python" },
    dependencies = {
      "nvim-neotest/neotest-go",
      "nvim-neotest/neotest-python",
      "rouge8/neotest-rust",
    },
  },

this code should be in the packs i guess.. the additional config = stuff is from the neotest-go site

rust config example

return {
  lsp = {
    servers = { "rust_analyzer" },
    config = {
      rust_analyzer = {
        settings = {
          ["rust-analyzer"] = {
            cargo = {
              loadOutDirsFromCheck = true,
              features = "all",
            },
            checkOnSave = {
              command = "clippy",
            },
            procMacro = {
              enable = true,
            },
            experimental = {
              procAttrMacros = true,
            },
          },
        },
      },
    },
  },
}

should we add this to the readme?

Rename `typescript-all-in-one` pack to just `typescript`

I think that the existing typescript pack should become typescript-node since we have typescript-deno.

This than allows us to use typescript for the currently named typescript-all-in-one pack.

This will be a breaking change for people using the new pack but otherwise be backwards compatible for configs using typescript but now have deno!

cc @owittek

location of config file

The setup instructions say "Add the following to your plugins configuration, either in your user/init.lua file or in a file in user/plugins/ folder such as user/plugins/community.lua." I'm somewhat new to AstroNvim. It is not clear to me where the user directory belongs. Should it be in ~/.config/nvim or ~/.config/nvim/lua or ~/.config/nvim/lua/plugins?

Using Lua language pack and traversing astroNvim configuration too slow

The astronvim configuration with userConfiguration slows down when I open a file in the configuration. It seems it is indexing every file in the index and libraries. The LSP status bar on the right behaves weird with multiple status being show. on top of another until the right hand side of screen is full

Add tabnine

Is your feature related to a problem?

The good point with Astrovim is you can have a full ide easily but if you don't know to much of lua, it is too difficult to implement it.

Describe the new feature

Tabnine is a useful tool to develop

Additional context

No response

feat: add clojure pack

Add a clojure pack to the Astrocommunity

  • Treesitter parser: clojure
  • LSP: clojure_lsp
  • Plugins: "Olical/conjure" and "gpanders/nvim-parinfer"

Additional config

Conjure defined keybingings relative to the localleader to be mapped, usually the , key
An autocmd is used to set ;; as the line comment character, to follow the Clojure style guide.

Draft clojure pack

A draft of what I think a Clojure pack would look like. I am new to lua and astronvim, so code enhancements are most welcome.

-- Clojure support with Conjure plugin
local utils = require "astronvim.utils"
return {
  -- Clojure Language Server
  {
    "williamboman/mason-lspconfig.nvim",
    opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "clojure_lsp") end,
  },
  -- Clojure parser
  {
    "nvim-treesitter/nvim-treesitter",
    opts = function(_, opts)
      if opts.ensure_installed ~= "all" then
        opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "clojure")
      end
    end,
  },
  -- Parinfer parens management for Clojure
  {
    "gpanders/nvim-parinfer",
    ft = { "clojure" },
    config = function()
      vim.g.parinfer_force_balance = true
      vim.g.parinfer_comment_chars = ";;"
    end,
  },
  -- Conjure plugin for Clojure REPL
  {
    "Olical/conjure",
    -- load plugin on filetypes
    ft = { "clojure" },
    config = function()
      vim.g.maplocalleader = ","
      vim.g["conjure#log#hud#width"] = 1
      vim.g["conjure#log#hud#enabled"] = false
      vim.g["conjure#log#hud#anchor"] = "SE"
      vim.g["conjure#log#botright"] = true
      vim.g["conjure#extract#context_header_lines"] = 100
      vim.g["conjure#eval#comment_prefix"] = ";;"
      vim.g["conjure#client#clojure#nrepl#connection#auto_repl#enabled"] = false
      vim.g["conjure#client#clojure#nrepl#connection#auto_repl#hidden"] = true
      vim.g["conjure#client#clojure#nrepl#connection#auto_repl#cmd"] = nil
      vim.g["conjure#client#clojure#nrepl#eval#auto_require"] = false
      vim.g["conjure#client#clojure#nrepl#test#runner"] = "kaocha"

      vim.api.nvim_create_autocmd("FileType", {
        group = vim.api.nvim_create_augroup("comment_config", { clear = true }),
        pattern = { "clojure" },
        callback = function() vim.bo.commentstring = ";; %s" end,
        desc = "Lisp style line comment",
      })
    end,
  },
}

References

bash pack uses wrong bin for shellcheck on Apple ARM

When using the bash pack and opening a shell script, I see the following error in my lsp logs:

[ERROR][2023-03-28 11:46:08] ...lsp/handlers.lua:485	"15:46:08.627 ERROR ⛔️ Error while linting: Error: ShellCheck: failed with code undefined: Error: spawn Unknown system error -86\nout:\n\nerr:\n"

after finding koalaman/shellcheck#2680 I have concluded that the error 86 is because the shellcheck version used is not built for ARM.

Interestingly, when I install shellcheck via brew, I can run it so I think this pack is just downloading the wrong binary or something ?

Use new `optional` option where applicable

Lazy.nvim recently added a new optional option that should make it easier to have plugins that configure other plugins only if they are available elsewhere. Should make it easier to make plugins that have interoperability with other plugins but you don't want to assume the user has it installed. It would be nice for us to use that wherever necessary

folke/lazy.nvim@9177778

rust-tools hover action key bindings?

Where do we define the keybinding for rust-tool's hover actions?

local rt = require("rust-tools")
rt.setup({
server = {
on_attach = function(_, bufnr)
-- Hover actions
vim.keymap.set("n", "", rt.hover_actions.hover_actions, { buffer = bufnr })
-- Code action groups
vim.keymap.set("n", "a", rt.code_action_group.code_action_group, { buffer = bufnr })
end,
},
})

Update colorscheme readme

I added some colorschemes in my community.lua file and they are installed but none show up when I telescope colorschemes or
run :colorschemes and tab through them. Do they need to call setup or anything?

More Plugins To Be Added

  {
    "b0o/incline.nvim",
    event = "User AstroFile",
    opts = { hide = { focused_win = true } },
  },
  { "lvimuser/lsp-inlayhints.nvim", event = "LspAttach", config = true },
{ "dpayne/CodeGPT.nvim", cmd = "Chat" },
  { "mrjones2014/op.nvim", build = "make install", opts = {} },
 {
 "lukas-reineke/headlines.nvim",
 dependencies = "nvim-treesitter/nvim-treesitter",
 ft = "markdown",
 opts = {},
},
{
  "nvim-zh/colorful-winsep.nvim",
  event = { "WinNew" },
  opts = {},
}, 

some plugins maybe someone wanna add
edit: i removed the plugins that got added

Update, not sure how to procced

Okay i know this might sound dumb etc but right now i dont know how to proceed.
Earlier today I updated my complete AstroNvim and i guess something broke. now at startup i get a long post but the problem is "~/.config/nvim/lua/user/plugins/nvim-regexplainer.lua:1: module 'astrocommunity.utils' not found" and i dont know what i should do there. i installed everything according to the installation help on astrovim.com and also tried to install the module on my own, but it didnt worked. i hope someone can help me somehow, even if it is just a plain dumb error from my side, than i am sorry for bothering you all

but still thanks and have a great day.

Typescript pack always to configured to use eslint and prettier

With the current configuration of the typescript pack, every project with a package.json in the root, will configure null-ls to use prettier and eslint.
This will show an error to the user for every project that doesn't have one of the two installed and configured.

A better approach would be to check inside the package.json if the keys eslintConfig and prettier are present.

null_ls.register(null_ls.builtins.formatting.prettierd.with {
condition = function(util)
return util.root_has_file "package.json"
or util.root_has_file ".prettierrc"
or util.root_has_file ".prettierrc.json"
or util.root_has_file ".prettierrc.js"
end,
})
end

astrocommunity.pack.python not working as intended with venv

Hi, I've been playing around with configuring Astrovim and since I'm still learning nvim/lua I wanted to use the python pack provided by astrocommunity. However, even though I activated the VirtualEnv in the shell before launching neovim, LSP still throws some erroneous "unable to import module" messages. As you can see in the screenshot below:

  • my venv is named Thesis and it's picked up by nvim (bottom right corner)
  • lsp still throws that import error
    image

Anyone had the same problem/could provide me some help? It's quite annoying seeing those messages there when they shouldn't be there.

Add contribution guidelines

Add a GitHub contribution guidelines markdown document as well adding a blurb to the readme about community contributions.

Main points so far:

  • anyone can contribute freely packs or plugin configs, this will be not a fully tested/supported repo and mainly community maintained and cared for
  • categories will follow as closely as we can to categories in neovimcraft.com
  • instructions on setting up a development environment with lazy to help users easily make contributions
  • Rebase instructions for maintaining linear history and no merge commits
  • conventional commit requirement

Why does noice-nvim require Tree-sitter with bash/markdown/etc?

Referring to https://github.com/AstroNvim/astrocommunity/blob/main/lua/astrocommunity/utility/noice-nvim/noice-nvim.lua#L3-L12 (perm:

{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
if not opts.ensure_installed then opts.ensure_installed = {} end
if type(opts.ensure_installed) == "table" then
utils.list_insert_unique(opts.ensure_installed, { "bash", "markdown", "markdown_inline", "regex", "vim" })
end
return opts
end,
},
)

I see that it does use Tree-sitter for Markdown apparently (L19), but why is the other languages there?

ccc: module ccc:highlighter not found

Fresh install of the ccc-nvim plugin and I get this stack trace:

Failed to run `config` for ccc.nvim

...community/lua/astrocommunity/color/ccc-nvim/ccc-nvim.lua:10: module 'ccc:highlighter' not found:
	no field package.preload['ccc:highlighter']
lazy_loader: module ccc:highlighter not found
lazy_loader_lib: module ccc:highlighter not found
	no file './ccc:highlighter.lua'
	no file '/home/watzon/Downloads/neovim/.deps/usr/share/luajit-2.1.0-beta3/ccc:highlighter.lua'
	no file '/usr/local/share/lua/5.1/ccc:highlighter.lua'
	no file '/usr/local/share/lua/5.1/ccc:highlighter/init.lua'
	no file '/home/watzon/Downloads/neovim/.deps/usr/share/lua/5.1/ccc:highlighter.lua'
	no file '/home/watzon/Downloads/neovim/.deps/usr/share/lua/5.1/ccc:highlighter/init.lua'
	no file './ccc:highlighter.so'
	no file '/usr/local/lib/lua/5.1/ccc:highlighter.so'
	no file '/home/watzon/Downloads/neovim/.deps/usr/lib/lua/5.1/ccc:highlighter.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'

Disable mason-lsp "K" hover_doc

I would like to use lspsaga for my LSP functionality like hover_doc and peek_definition. I am trying to override the default "Shift K" functionality but I am unable to unmap the key properly. My python.lua is based on the Python community pack found on this github so was hoping I could get help related to this here. My python.lua looks like this

local utils = require "astrocommunity.utils"
return {
  {
    "nvim-treesitter/nvim-treesitter",
    opts = function(_, opts)
      -- Ensure that opts.ensure_installed exists and is a table or string "all".
      if not opts.ensure_installed then
        opts.ensure_installed = {}
      elseif opts.ensure_installed == "all" then
        return
      end
      -- Add the "python" and "toml" language to opts.ensure_installed.
      utils.list_insert_unique(opts.ensure_installed, { "python", "toml" })
    end,
  },
  {
    "williamboman/mason-lspconfig.nvim",
    opts = function(_, opts)
      -- Ensure that opts.ensure_installed exists and is a table.
      if not opts.ensure_installed then opts.ensure_installed = {} end
      -- Add pyright lsp to opts.ensure_installed using table.insert.
      utils.list_insert_unique(opts.ensure_installed, {})
    end,
  },
  {
    "jay-babu/mason-null-ls.nvim",
    opts = function(_, opts)
      -- Ensure that opts.ensure_installed exists and is a table.
      if not opts.ensure_installed then opts.ensure_installed = {} end
      -- Add to opts.ensure_installed using vim.list_extend.
      utils.list_insert_unique(opts.ensure_installed, { "isort", "blue" })
    end,
  },
  {
    "jay-babu/mason-nvim-dap.nvim",
    opts = function(_, opts)
      -- Ensure that opts.ensure_installed exists and is a table.
      if not opts.ensure_installed then opts.ensure_installed = {} end
      -- Add to opts.ensure_installed using table.insert.
      utils.list_insert_unique(opts.ensure_installed, "python")
    end,
  },
  {
    "linux-cultist/venv-selector.nvim",
    opts = {},
    keys = { { "<leader>lv", "<cmd>:VenvSelect<cr>", desc = "Select VirtualEnv" } },
  },
}

And the mappings.lua to make the functionality I want work looks like this:

["K"] = { ":Lspsaga hover_doc<cr>", desc = "Lspsaga hover documentation" },
  ["<S-K>"] = { ":Lspsaga hover_doc<cr>", desc = "Lspsaga hover documentation" },

I have also tried setting prior to the above lines but the default lsp hover_doc still pops up.
["K"] = false ,

The current functionality looks like this:
Screenshot 2023-03-27 at 10 22 14 PM

Whereas if I call LSPsaga manually the output looks like this
Screenshot 2023-03-27 at 10 22 37 PM

Update README files for packs

Recently there have been a few issues regarding caveats with certain packs. Notably #179 and #101.

I think that it would be a good idea to require / request more documentation and examples in the README when adding packs.

This is just a suggestion and isn't necessary, but it may help newer users.

Copilot feature for accept word/line

Copilot has a feature for accepting the next word and the next line of the suggestion. Could these be mapped to keybindings (e.g. Ctrl-L/Ctrl-Right for accept word and Ctrl-J/Ctrl-Down for accept line) in the completion.copilot-cmp pack?

astrocommunity.pack.java doesn't work for me

I added { import = "astrocommunity.pack.java" }, to my user/plugins/community.lua file but the language server doesn't seems to work and doesn't show up at the bottom right corner.

I also get this notification from the screenshot.
swappy-20230430_151203

Additionally :set filetype=java doesn't work and shows this notification.
Does anyone know, how to debug this specific error or know the cause for it?

Thanks in advance. ✌️

~/.local/state/nvim/lsp.log prints:

[START][2023-05-01 21:09:37] LSP logging initiated
[ERROR][2023-05-01 21:09:37] .../vim/lsp/rpc.lua:734    "rpc"    "java"    "stderr"    "Error: Unable to access jarfile \n"

:echo $PATH prints:

/home/user_name/.local/share/nvim/mason/bin:/home/user_name/.npm-global/bin:/home/user_name/.local/bi
n:/usr/local/sbin:/usr/local/bin:/usr/bin:/home/user_name/.dotnet/tools:/usr/lib/jvm/defaul
t/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

Here is the output from :checkhealth :

==============================================================================
astronvim: require("astronvim.health").check()

AstroNvim ~
- AstroNvim Version: v3.13.2
- Neovim Version: v0.9.0
- OK Using stable Neovim >= 0.8.0
- OK `git` is installed: Used for core functionality such as updater and plugin management
- OK `xdg-open` is installed: Used for `gx` mapping for opening files with system opener (Optional)
- OK `lazygit` is installed: Used for mappings to pull up git TUI (Optional)
- OK `node` is installed: Used for mappings to pull up node REPL (Optional)
- WARNING `gdu` is not installed: Used for mappings to pull up disk usage analyzer (Optional)
- WARNING `btm` is not installed: Used for mappings to pull up system monitor (Optional)
- OK `python` is installed: Used for mappings to pull up python REPL (Optional)

==============================================================================
lazy: require("lazy.health").check()

lazy.nvim ~
- OK Git installed
- OK no existing packages found by other package managers
- OK packer_compiled.lua not found
- WARNING {package-info.nvim}: unknown key <requires>

==============================================================================
mason: require("mason.health").check()

mason.nvim ~
- OK mason.nvim version v1.0.1
- OK neovim version >= 0.7.0

mason.nvim [Registries] ~
- OK Registry `github.com/mason-org/mason-registry version: 2023-05-01-asian-porgy` is installed.

mason.nvim [Core utils] ~
- OK unzip: `UnZip 6.00 of 20 April 2009, by Info-ZIP.  Maintained by C. Spieler.  Send`
- OK wget: `GNU Wget 1.21.3 built on linux-gnu.`
- OK curl: `curl 8.0.1 (x86_64-pc-linux-gnu) libcurl/8.0.1 OpenSSL/3.0.8 zlib/1.2.13 brotli/1.0.9 zstd/1.5.4 libidn2/2.3.4 libpsl/0.21.2 (+libidn2/2.3.4) libssh2/1.10.0 nghttp2/1.52.0`
- OK gzip: `gzip 1.12`
- OK tar: `tar (GNU tar) 1.34`
- OK bash: `GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)`
- OK sh: `Ok`

mason.nvim [Languages] ~
- WARNING luarocks: not available
  - ADVICE:
    - spawn: luarocks failed with exit code - and signal -. luarocks is not executable
- WARNING Composer: not available
  - ADVICE:
    - spawn: composer failed with exit code - and signal -. composer is not executable
- WARNING PHP: not available
  - ADVICE:
    - spawn: php failed with exit code - and signal -. php is not executable
- OK Go: `go version go1.20.3 linux/amd64`
- OK cargo: `cargo 1.68.2`
- OK Ruby: `ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c5) [x86_64-linux]`
- OK node: `v14.21.3`
- WARNING julia: not available
  - ADVICE:
    - spawn: julia failed with exit code - and signal -. julia is not executable
- OK python3: `Python 3.10.10`
- OK java: `openjdk version "17.0.6" 2023-01-17`
- OK RubyGem: `3.3.25`
- OK javac: `javac 17.0.6`
- OK npm: `8.19.2`
- OK pip3: `pip 23.0.1 from /usr/lib/python3.10/site-packages/pip (python 3.10)`

mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 0. Remaining: 60. Limit: 60. Reset: Tue 02 May 2023 02:48:56 AM CEST.
  Install and authenticate via gh-cli to increase rate limit.

==============================================================================
null-ls: require("null-ls.health").check()

- OK prettier: the command "prettier" is executable.
- OK stylua: the command "stylua" is executable.

==============================================================================
nvim: require("nvim.health").check()

Configuration ~
- OK no issues found

Runtime ~
- OK $VIMRUNTIME: /usr/share/nvim/runtime

Performance ~
- OK Build type: Release

Remote Plugins ~
- OK Up to date

terminal ~
- key_backspace (kbs) terminfo entry: `key_backspace=\177`
- key_dc (kdch1) terminfo entry: `key_dc=\E[3~`
- $TERM_PROGRAM="foot"
- $COLORTERM="truecolor"

==============================================================================
nvim-treesitter: require("nvim-treesitter.health").check()

Installation ~
- OK `tree-sitter` found 0.20.8 (parser generator, only needed for :TSInstallFromGrammar)
- OK `node` found v14.21.3 (only needed for :TSInstallFromGrammar)
- OK `git` executable found.
- OK `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
  Version: cc (GCC) 12.2.1 20230201
- OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.

OS Info:
{
  machine = "x86_64",
  release = "5.15.108-1-MANJARO",
  sysname = "Linux",
  version = "#1 SMP PREEMPT Thu Apr 20 11:41:14 UTC 2023"
} ~

Parser/Features         H L F I J
  - lua                 ✓ ✓ ✓ ✓ ✓

  Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
         +) multiple parsers found, only one will be used
         x) errors found in the query, try to run :TSUpdate {lang} ~

==============================================================================
provider: health#provider#check

Clipboard (optional) ~
- OK Clipboard tool found: wl-copy

Python 3 provider (optional) ~
- `g:python3_host_prog` is not set.  Searching for python3 in the environment.
- Executable: /usr/bin/python3
- ERROR Command error (job=5, exit code 1): `'/usr/bin/python3' -c 'import sys; sys.path = [p for p in sys.path if p != ""]; import neovim; print(neovim.__file__)'` (in '/home/user_name')
  stderr: Traceback (most recent call last):  File "<string>", line 1, in <module>  File "/home/user_name/.local/lib/python3.10/site-packages/neovim/__init__.py", line 5, in <module>    import pynvim  File "/home/user_name/.local/lib/python3.10/site-packages/pynvim/__init__.py", line 9, in <module>    from pynvim.api import Nvim, NvimError  File "/home/user_name/.local/lib/python3.10/site-packages/pynvim/api/__init__.py", line 7, in <module>    from pynvim.api.buffer import Buffer  File "/home/user_name/.local/lib/python3.10/site-packages/pynvim/api/buffer.py", line 2, in <module>    from pynvim.api.common import Remote  File "/home/user_name/.local/lib/python3.10/site-packages/pynvim/api/common.py", line 4, in <module>    from msgpack import unpackbModuleNotFoundError: No module named 'msgpack'
- Python version: 3.10.10
- pynvim version: unable to load neovim Python module
- ERROR pynvim is not installed.
  Error: unable to load neovim Python module
  - ADVICE:
    - Run in shell: /usr/bin/python3 -m pip install pynvim

Python virtualenv ~
- OK no $VIRTUAL_ENV

Ruby provider (optional) ~
- Ruby: ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c5) [x86_64-linux]
- WARNING `neovim-ruby-host` not found.
  - ADVICE:
    - Run `gem install neovim` to ensure the neovim RubyGem is installed.
    - Run `gem environment` to ensure the gem bin directory is in $PATH.
    - If you are using rvm/rbenv/chruby, try "rehashing".
    - See :help |g:ruby_host_prog| for non-standard gem installations.
    - You may disable this provider (and warning) by adding `let g:loaded_ruby_provider = 0` to your init.vim

Node.js provider (optional) ~
- Node.js: v14.21.3
- WARNING Missing "neovim" npm (or yarn, pnpm) package.
  - ADVICE:
    - Run in shell: npm install -g neovim
    - Run in shell (if you use yarn): yarn global add neovim
    - Run in shell (if you use pnpm): pnpm install -g neovim
    - You may disable this provider (and warning) by adding `let g:loaded_node_provider = 0` to your init.vim

Perl provider (optional) ~
- WARNING "Neovim::Ext" cpan module is not installed
  - ADVICE:
    - See :help |provider-perl| for more information.
    - You may disable this provider (and warning) by adding `let g:loaded_perl_provider = 0` to your init.vim

==============================================================================
vim.lsp: require("vim.lsp.health").check()

- LSP log level : WARN
- Log path: /home/user_name/.local/state/nvim/lsp.log
- Log size: 375 KB

vim.lsp: Active Clients ~
- null-ls (id=1, root_dir=/home/user_name)

==============================================================================
vim.treesitter: require("vim.treesitter.health").check()

- Nvim runtime ABI version: 14
- OK Parser: lua        ABI: 13, path: /home/user_name/.local/share/nvim/lazy/nvim-treesitter/parser/lua.so

==============================================================================
vimtex: health#vimtex#check

VimTeX ~
- OK Vim version should have full support!
- WARNING biber is not executable!
  - ADVICE:
    - Biber is often required so this may give unexpected problems.
- OK General viewer should work properly!
- OK Compiler should work!

==============================================================================
which-key: require("which-key.health").check()

WhichKey: checking conflicting keymaps ~
- WARNING conflicting keymap exists for mode **"v"**, lhs: **"<leader>l"**
- rhs: ` `
- OK No conflicting keymaps found

Installing community plugins from the astrocommunity repo triggers treesitter and mason errors with a fresh install of base astronvim

Checklist

  • Using a stable version of Neovim (i.e. not neovim nightly)
  • :AstroUpdate
  • Restarted AstroNvim

Operating system/version

Ubuntu 22.10

Terminal/GUI

Wezterm

AstroNvim Health

AstroNvim ~

  • AstroNvim Version: nightly (v3.15.7)
  • Neovim Version: v0.9.0
  • OK Using stable Neovim >= 0.8.0
  • OK git is installed: Used for core functionality such as updater and plugin management
  • OK xdg-open is installed: Used for gx mapping for opening files with system opener (Optional)
  • OK lazygit is installed: Used for mappings to pull up git TUI (Optional)
  • OK node is installed: Used for mappings to pull up node REPL (Optional)
  • OK gdu is installed: Used for mappings to pull up disk usage analyzer (Optional)
  • OK btm is installed: Used for mappings to pull up system monitor (Optional)
  • OK python is installed: Used for mappings to pull up python REPL (Optional)

Describe the bug

For a fresh astronvim base install, trying to install any of the community plugins triggers pageful of lua errors with both Mason (first) and treesitter (subsequently).

Error detected while processing /home/krishnakumar/.config/nvim/init.lua:
Failed to run `config` for mason.nvim
.../krishnakumar/.config/nvim/lua/plugins/configs/mason.lua:2: module 'mason' not found:
^Ino field package.preload['mason']
cache_loader: module mason not found
cache_loader_lib: module mason not found
^Ino file './mason.lua'
^Ino file '/home/linuxbrew/.linuxbrew/share/luajit-2.1.0-beta3/mason.lua'
^Ino file '/usr/local/share/lua/5.1/mason.lua'
^Ino file '/usr/local/share/lua/5.1/mason/init.lua'
^Ino file '/home/linuxbrew/.linuxbrew/share/lua/5.1/mason.lua'
^Ino file '/home/linuxbrew/.linuxbrew/share/lua/5.1/mason/init.lua'
^Ino file './mason.so'
^Ino file '/usr/local/lib/lua/5.1/mason.so'
^Ino file '/home/linuxbrew/.linuxbrew/lib/lua/5.1/mason.so'
^Ino file '/usr/local/lib/lua/5.1/loadall.so'
# stacktrace:
  - ~/.config/nvim/lua/plugins/configs/mason.lua:2 _in_ **config**
  - ~/.config/nvim/lua/astronvim/lazy.lua:34
  - ~/.config/nvim/init.lua:8
Failed to source `/home/krishnakumar/.local/share/nvim/lazy/nvim-ts-autotag/plugin/nvim-ts-autotag.vim`
vim/_editor.lua:0: /home/krishnakumar/.config/nvim/init.lua..nvim_exec2() called at /home/krishnakumar/.config/nvim/init.lua:0../home/krishnakuma
r/.local/share/nvim/lazy/nvim-ts-autotag/plugin/nvim-ts-autotag.vim, line 1: Vim(lua):E5108: Error executing lua [string ":lua"]:1: module 'nvim-
ts-autotag' not found:

Steps to Reproduce

  1. Perform a fresh install of astronvim
  2. Create only one user config file in ~/.config/astronvim/lua/user/plugins/community.lua and try to install a community package.
  3. Quit neovim
  4. Remove all neovim data files from the system i.e. rm -rfv ~/.local/share/nvim/ ~/.local/state/nvim/ ~/.cache/nvim/. This is important
  5. Fire up neovim. When it starts installing various plugins etc, it shall give out a mason error (as pasted above) and follows it up with a treesitter-textobjects related error.

Expected behavior

The astronvim user community plugins should work seamlessly with a fresh state of a clean local cache and not produce these errors which run into pages.

Screenshots

image

Additional Context

No response

completion.copilot: unable to choose suggestion

Sorry for duplicating the issue from astronvim repo, but this one will be more about having the functionality working out of the box with community plugin. Plus, mentioned issue doesn't have a solution anyway.

I think it's pretty common for people to use Copilot and normal autocompletion. Copilot works really well without cmp, so I don't use copilot-cmp plugin.
I typically use Ctrl-J for accepting copilot suggestion.

So the typical workflow should be:

  • whenever suggestion is generated, Ctrl-J should choose it
  • otherwise the autocompletion from cmp should work as usually

But with as much as possible default configuration, pressing Ctrl-J results in selecting first option from cmp autocompletion. Copilot suggestions only work when there are no autocompletion options available.

My mappings are defined as follows:

local mappings = {
 n = {
    ["<C-cr>"] = { "copilot#Accept(<Tab>)", silent = true, expr = true, script = true },
  }
}

I looked at other issues and SO posts, but can't figure out how to make it work nicely. In my previous nvim setup I did some hackish things for that and I have no idea what actually worked (messy own config was actually one of the reasons to try Astronvim).

Any suggestions how to make copilit and cmp work out of the box nicely?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.