astronvim / user_example Goto Github PK
View Code? Open in Web Editor NEWAn example user configuration with a split up structure
An example user configuration with a split up structure
NVIM v0.9.0-dev-1047+gf0f27e9ae
wsl
windows terminal
I installed the "preservim/tagbar" plugin but it doesn't work.
I added { "preservim/tagbar" }, to my user.lua file.
I want to use tagbar,
please check.
{ "preservim/tagbar" },
:TagbarToggle
...
No response
No response
Operating System: Fedora Linux 37
Terminal: Kitty or Gnome Terminal
Description: When there are gitsigns markers present, the buffer will visibly shift side to side on format. It appears that the gitsigns markers are disappearing and loading back in, causing the movement.
Steps to reproduce:
Recording:
In the recording, I start with no user/ directory, so I'm using default AstroNvim. I open mappings.lua, add some unwanted whitespace, and run the formatter to see the expected behaviour of no shifting of the buffer.
Then, I rename user_example to user, repeat the above, and observe the bug.
Finally, I open the same file which has been copied to a location not in a git repository, repeat the steps, and see the expected behaviour again.
I am trying to setup the debugger from react and am successful in doing so, only if I add my config file somewhere inside the Astrovim folder and calling require for this config file
Eg added my config nvim-dap-config.lua
inside astrovim/plugins/configs/nvim-dap-config.lua
and called
local dap-config = require("plugins.configs.nvim-dap-config")
inside mappings.lua .Everything is working as expected
now I wanted to move this file to $HOME/config/astrovim/user/...
Can i get some help on how to acheive this
Contents of nvim-dap-config.lua
local dap = require("dap")
dap.set_log_level("TRACE")
dap.adapters.node2 = {
type = "executable",
command = "node",
args = { vim.fn.stdpath("data") .. "/mason/packages/node-debug2-adapter/out/src/nodeDebug.js" },
}
dap.configurations.javascriptreact = {
{
name = "Chrome (9222)",
type = "chrome",
request = "attach",
program = "${file}",
cwd = vim.fn.getcwd(),
sourceMaps = true,
protocol = "inspector",
port = 9222,
webRoot = "${workspaceFolder}",
},
{
name = "React Native (8081) (Node2)",
type = "node2",
request = "attach",
program = "${file}",
cwd = vim.fn.getcwd(),
sourceMaps = true,
protocol = "inspector",
console = "integratedTerminal",
port = 8081,
},
{
name = "Attach React Native (8081)",
type = "pwa-node",
request = "attach",
processId = require("dap.utils").pick_process,
cwd = vim.fn.getcwd(),
rootPath = "${workspaceFolder}",
skipFiles = { "<node_internals>/**", "node_modules/**" },
sourceMaps = true,
protocol = "inspector",
console = "integratedTerminal",
},
}
I tried following the same method as above, the file is getting detected by the astro config, but dap this new dap config is not getting appended
Any help on how to add this config in my user astro config will be much appreciated
I don't want to lose new features
:PackerSync
:AstroUpdate
13.2.1
wezterm
astronvim: require("astronvim.health").check()
========================================================================
## AstroNvim
- INFO: AstroNvim Version: v3.0.1
- INFO: Neovim Version: v0.8.2
- 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)
- OK: `gdu` is 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: `python3` is installed: Used for mappings to pull up python REPL (Optional)
Calling plugin.default_config(opts)
in a plugin throws nil value error.
File: plugins/treesitter.lua
return {
"nvim-treesitter/nvim-treesitter",
config = function(plugin, opts)
plugin.default_config(opts)
end
}
Should not throw error.
No response
Adding packages to ensure_installed
in plugins/treesitter.lua
and plugins/mason.lua
overwrites the ensure_installed
tables set by any astrocommunity packs.
I have imported a few language packs in plugins/community.lua
:
return {
"AstroNvim/astrocommunity",
-- colorschemes
{ import = "astrocommunity.colorscheme.catppuccin" },
-- languages
{ import = "astrocommunity.pack.json" },
{ import = "astrocommunity.pack.toml" },
{ import = "astrocommunity.pack.markdown" },
{ import = "astrocommunity.pack.lua" },
}
This results in the following being set in treesitter:
:TSConfigInfo
{
...
ensure_installed = { "json", "jsonc", "toml", "markdown", "markdown_inline", "lua", "luap" },
...
}
But once I add something manually to plugins/treesitter.lua
(following the commented out example):
return {
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = { "python" },
},
}
treesitter's ensure_installed is overwritten:
:TSConfigInfo
{
...
ensure_installed = { "python" },
...
}
We could change the commented out examples in plugins/treesitter.lua
and plugins/mason.lua
to utilize the util function used by astrocommunity to extend the ensure_installed list. This would risk confusing users, but would allow for interoperability between community packs and manual config.
local utils = require "astrocommunity.utils"
return {
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
if not opts.ensure_installed then
opts.ensure_installed = {}
elseif opts.ensure_installed == "all" then
return
end
-- utils.list_insert_unique(opts.ensure_installed, { "python" })
end
}
Both the written documentation and youtube tutorials are using Unix environment with ~/.config
but the Windows environment is different.
Can there be some documentation on how to set up the user config on Windows?
AstroNvim uses icons for many of the top level menu items in which-key.
Is it possible to use icons with key bindings defined in the AstroNvim/user_example config, e.g. mappings.lua
I would like to include icons for menu items from packages I have added to my own user config (forked from this example template).
Packages are added via the Astrocommunity or directly using the lazy syntax.
Thank you.
examples how to extend cmp with crates.nvim or cmp-copilot would be nice.
or maybe how to have a rust.lua
or a copilot.lua
For instance, I want to add a function that adds an ipdb breakpoint
in python files and bind it in mapping.lua. Where should I elegantly position this function within the template?
As the title states, I can't seem to find the button, maybe it's a problem to do with my browser or something, I'm quite new to using github.
1 clean install
2 open a git repo
this error will show up
after deleting colors.lua, it will work again
looks like this line is the problem:
https://github.com/AstroNvim/split_user_example/blob/5a93e3dd9c3d60bdbbe2148f872af7df9aae609b/heirline/colors.lua#L3
reported in chat by gwww
reproduced by me
Thanks for putting together this user_example.
I understand you favor a multiple file configuration but for many people this is not ideal and rather complex.
Could you please provide an example of a single file configuration?
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.