Giter VIP home page Giter VIP logo

user_example's Issues

tagbar not working

Checklist

  • I have searched through the AstroNvim docs
  • I have searched through the existing issues of AstroNvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.9.0-dev-1047+gf0f27e9ae

Operating system/version

wsl

Terminal/GUI

windows terminal

Describe the bug

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.

Steps to Reproduce

{ "preservim/tagbar" },
:TagbarToggle

Expected behavior

...

Screenshots

No response

Additional Context

No response

Buffer visibly shifts on format with gitsigns on

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:

  • Remove/rename any existing user config
  • Clone the user_example repository to the lua/ directory
  • Rename user_example to user
  • Open a file with a formatter active
  • Make a change that needs to be formatted
  • Format

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.

asciicast

how to setup dap config from user config files

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 

plugin.default_config(opts) throws nil value error

Checklist

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

Operating system/version

13.2.1

Terminal/GUI

wezterm

AstroNvim Health

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)

Describe the bug

Calling plugin.default_config(opts) in a plugin throws nil value error.

Steps to Reproduce

File: plugins/treesitter.lua

return {
  "nvim-treesitter/nvim-treesitter",
  config = function(plugin, opts)
    plugin.default_config(opts)
  end
}

Expected behavior

Should not throw error.

Screenshots

image

Additional Context

No response

Avoid overwriting Treesitter/Mason ensure_installed

Problem

Adding packages to ensure_installed in plugins/treesitter.lua and plugins/mason.lua overwrites the ensure_installed tables set by any astrocommunity packs.

Example

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" },
  ...
}

Proposal

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
}

How to setup the config on Windows?

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?

support icons in which-key menu

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.

References

add some code for cmp

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

Custom functions should be placed where?

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?

'Use this template' Button missing?

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.

Provide an alternative single file example

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?

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.