astronvim / astrocommunity Goto Github PK
View Code? Open in Web Editor NEWA community repository of common plugin specifications
License: GNU General Public License v3.0
A community repository of common plugin specifications
License: GNU General Public License v3.0
Add a GitHub contribution guidelines markdown document as well adding a blurb to the readme about community contributions.
Main points so far:
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:
Whereas if I call LSPsaga manually the output looks like this
Add a clojure pack to the Astrocommunity
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.
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,
},
}
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:
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?
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,
},
})
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.
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:
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?
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
Pressing lv doesn't open any popup.
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.
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.
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
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
?
:healthcheck report (https://gist.github.com/duanyuluo/e928d4672f7f31a1a185201e55810184)
import trouble-nvim plugin at community.lua
modify keymap
these mappings are all work, which-key -> < leader > E
PROBLEM: default < leader > x also exist in which-key
How to cover default config (eg, keymap) in astrocommunity?
Getting the following error when installing the js-debug-adapter
plugin in the Typescript pack:
Cannot write Node exec wrapper for path "out/src/vsDebugServer.js" as it doesn't exist.
Using Node v19.8.1 and npm 9.5.1.
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"
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
:
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!
{
"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
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'
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 ?
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
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.
if someone wants to add a css pack .. that would be wonderful :D
i think that's a good example
https://github.com/elijahmanor/youtube-lazyvim-tailwind/blob/main/lua/plugins/tailwind.lua
{
"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
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?
Can't mason just be used to manage the installation of this?
Originally posted by @jay-babu in #229 (comment)
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
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.
Tabnine is a useful tool to develop
No response
Hi there,
Making this issue as a reference for a pull request. Taplo is being initialized twice as it is being initialized elsewhere.
This should be added to astronvim.lsp.skip_setup.
maybe it makes sense to add the module name to the readme
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
Hi,
Is there an equivalent to this highlighter plugin ?
If not, how can i install a vimscript plugin with astroNvim?
many thanks
We should improve the lazy loading of completion.copilot-lua
to be similar to how completion.copilot-cmp
is set up. It's much more robust than just InsertEnter.
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.
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.
astrocommunity/lua/astrocommunity/pack/typescript/typescript.lua
Lines 41 to 49 in b88a6e6
:AstroUpdate
Ubuntu 22.10
Wezterm
git
is installed: Used for core functionality such as updater and plugin managementxdg-open
is installed: Used for gx
mapping for opening files with system opener (Optional)lazygit
is installed: Used for mappings to pull up git TUI (Optional)node
is installed: Used for mappings to pull up node REPL (Optional)gdu
is installed: Used for mappings to pull up disk usage analyzer (Optional)btm
is installed: Used for mappings to pull up system monitor (Optional)python
is installed: Used for mappings to pull up python REPL (Optional)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:
~/.config/astronvim/lua/user/plugins/community.lua
and try to install a community package.rm -rfv ~/.local/share/nvim/ ~/.local/state/nvim/ ~/.cache/nvim/
. This is importantThe 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.
No response
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:
Anyone had the same problem/could provide me some help? It's quite annoying seeing those messages there when they shouldn't be there.
This issue only occurs when using both satellite.nvim
and zen-mode.nvim
. Entering Zen mode disables most UI except the scrollbar. I believe this should be toggled in the on_open
and on_close
functions here:
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.
i use astrocommunity pack python, but it has not code action. do you have another lsp recommend.
:checkhealth https://gist.github.com/duanyuluo/e928d4672f7f31a1a185201e55810184
dropbar.nvim requires at least nvim 0.10 ?!
:AstroUpdate
macOS 12.6.1
iTerm2
git
is installed: Used for core functionality such as updater and plugin managementopen
is installed: Used for gx
mapping for opening files with system opener (Optional)lazygit
is installed: Used for mappings to pull up git TUI (Optional)node
is installed: Used for mappings to pull up node REPL (Optional)gdu
is not installed: Used for mappings to pull up disk usage analyzer (Optional)btm
is not installed: Used for mappings to pull up system monitor (Optional)python
is installed: Used for mappings to pull up python REPL (Optional)gopls is not attached to a go buffer. Does not happen when on AstroNvim 2.*
gopls attached
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
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.
https://www.reddit.com/r/neovim/comments/13l0p0p/leapnvim_meets_vimilluminate/
Does anyone want to integrate it?
Referring to https://github.com/AstroNvim/astrocommunity/blob/main/lua/astrocommunity/utility/noice-nvim/noice-nvim.lua#L3-L12 (perm:
)I see that it does use Tree-sitter for Markdown apparently (L19), but why is the other languages there?
:checkhealth report : https://gist.github.com/duanyuluo/e928d4672f7f31a1a185201e55810184
import pack.rust in community
add "codelldb" in mason.lua
Do I need to config Dap provider and configuration by myself? ( I have try it, but it's so complex...)
This plugin is useful to add the closing word in different languages, such as Lua or Ruby.
Check the repository for a video and more information:
https://github.com/RRethy/nvim-treesitter-endwise
You can try it using:
return {
{
"RRethy/nvim-treesitter-endwise",
event = "VeryLazy",
config = function()
require('nvim-treesitter.configs').setup {
endwise = {
enable = true
}
}
end
}
}
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?
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.