Giter Site home page Giter Site logo

starter's Issues

Set NvChad Theme Error

After installation and download all plugins on attempting to change theme over <leader> + th at moment to change selected theme gets error:

E5108: Error executing lua: .../share/nvim/lazy/ui/lua/telescope/_extensions/themes.lua:68: attempt to index field 'ui' (a n il value)

related source file:

      ------------ save theme to chadrc on enter ----------------
      actions.select_default:replace(function()
        if action_state.get_selected_entry() then
          local chadrc = dofile(vim.fn.stdpath "config" .. "/lua/chadrc.lua")

          local old_theme = chadrc.ui.theme or chadrc.base46.theme
          old_theme = 'theme = "' .. old_theme .. '"'

          local theme = 'theme = "' .. action_state.get_selected_entry()[1] .. '"'

          require("nvchad.utils").replace_word(old_theme, theme)
          actions.close(prompt_bufnr)
        end
      end)

error on line: local old_theme = chadrc.ui.theme or chadrc.base46.theme

lua/chadrc.lua:

---@type ChadrcConfig
local M = {}

M.base46 = {
	theme = "onedark",

	-- hl_override = {
	-- 	Comment = { italic = true },
	-- 	["@comment"] = { italic = true },
	-- },
}

return M

in this file ui is not defined.

Workarraund is to append to lua/chadrc.lua empty table M.ui = {}
Not schure what fix is correct - it's my first expereance to meet nvim and first day to meet NvChard.

No promot for creating custom config

I tried to install nvchad with this command

git clone https://github.com/NvChad/starter ~/.config/nvim

After installing it Lazy started installing plugins but it didn't ask for creating an example custom config.

comment toggle not working

Describe the bug
/ is unable to toogle comment. Tested on unaltered config.

To Reproduce
Steps to reproduce the behavior:

Open any file with some code( say init.lua)
press /, nothing happens.

Expected behavior
Toggle comment.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):
Operating System : Ubuntu 24.04
Terminal : Gnome Terminal
Version of Neovim : 0.9.5
Additional context
Add any other context about the problem here.

UI - statusline modules `order` config doesn't work

Hi, I'm trying to migrate my statusline settings from overriden_modules to the modules field as shown in the NvChad UI Configuration.

However when I tried to set the order of statusline modules, I simply got this error and not surprisingly it didn't work:

Screenshot 2024-04-01 at 16 40 43

My code:

  statusline = {
    -- Old
    -- overriden_modules = function(modules)
    --   -- Show column number in statusline
    --   table.insert(modules, 9, "%#St_ln_col#" .. " Ln %l, Col %c ")
    -- end,
    modules = {
      order = { "mode", "file", "git", "%=", "lsp_msg", "%=", "diagnostics", "lsp", "cursor_loc", "cwd", "cursor" },
      cursor_loc = function()
        return "%#St_ln_col#" .. " Ln %l, Col %c "
      end,
    },
  },

The doc and nvconfig.lua both implies that order is indeed an array though ๐Ÿค” :

...
  statusline = {
    -- more opts
    order = {...}, -- check stl/utils.lua file in ui repo 
    modules = {
      -- The default cursor module is override
      cursor = function()
        return "%#BruhHl#" .. " bruh " -- the highlight group here is BruhHl      end,
    }
  }
...

and nvconfig.lua:

...
  statusline = {
    theme = "default", -- default/vscode/vscode_colored/minimal
    -- default/round/block/arrow separators work only for default statusline theme
    -- round and block will work for minimal theme only
    separator_style = "default",
    order = nil,
    modules = nil,
  },

  tabufline = {
    enabled = true,
    lazyload = true,
    order = { "treeOffset", "buffers", "tabs", "btns" },
    modules = nil,
  },
...

custom install nvim-treesitter breaks theme on a .go file

If I add nvim-treesitter at ~/.config/nvim/lua/plugins/init.lua with my configs, it breaks the theme. ie everytime I have to th and select the theme.

{
    "nvim-treesitter/nvim-treesitter",
    config = function()
      require("nvim-treesitter.configs").setup {
        ensure_installed = {
          "go",
        },
      }
    end,
  },

I see that nvim-treesitter is already installed by NvChad. Is it possible to add my custom configs to the existing one?

If I add "nvim-treesitter/nvim-treesitter-textobjects" it breaks the theme as well.

I do see the theme getting updated in chardrc.lua file

M.ui = {
  theme = "ashes",

Conform formatters_by_ft problem

Hello, thank you for making nvchad

I am having a problem with formatters_by_ft, when i uncommented it from the starter its giving me this error whenever i format the lua file with fm.
Screenshot from 2024-06-09 14-32-38

Then when I uncomment the format_on_save together with formatters_by_ft, and then save the file this error occur
Screenshot from 2024-06-09 14-30-39

Docs never show how "how to use the nvchad repo as a plugin."

Followed the docs and I am missing how to actually use the remaining parts of this. It is appreciated, but this starter is confusing and miss directs. The docs say start and add NvChad, but never actually show how or mention how, so I am lost.

I watched a great video for this and it had you clone the main NvChad repo, but I guess those instructions are now out of date.

Thanks

git clone https://github.com/NvChad/starter ~/.config/nvim && nvim

Error detected while processing /home/nvim/.config/nvim/init.lua:
E5113: Error while calling lua chunk: /home/nvim/.config/nvim/init.lua:17: module 'lazy' not found:
no field package.preload['lazy']
no file './lazy.lua'
no file '/__w/neovim/neovim/.deps/usr/share/luajit-2.1/lazy.lua'
no file '/usr/local/share/lua/5.1/lazy.lua'
no file '/usr/local/share/lua/5.1/lazy/init.lua'
no file '/__w/neovim/neovim/.deps/usr/share/lua/5.1/lazy.lua'
no file '/__w/neovim/neovim/.deps/usr/share/lua/5.1/lazy/init.lua'
no file './lazy.so'
no file '/usr/local/lib/lua/5.1/lazy.so'
no file '/__w/neovim/neovim/.deps/usr/lib/lua/5.1/lazy.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
/home/nvim/.config/nvim/init.lua:17: in main chunk

Can't install with git in gentoo

I tried the installation process in the webpage but it don't work in my gentoo linux. All i get is that everytime

Error detected while processing /home/user/.config/nvim/init.lua:
E5113: Error while calling lua chunk: /home/user/.config/nvim/init.lua:17: module 'lazy' not found: 
        no field package.preload['lazy']
        no file './lazy.lua'
        no file '/usr/share/luajit-2.1.0-beta3/lazy.lua'
        no file '/usr/local/share/lua/5.1/lazy.lua'
        no file '/usr/local/share/lua/5.1/lazy/init.lua'
        no file '/usr/share/lua/5.1/lazy.lua'
        no file '/usr/share/lua/5.1/lazy/init.lua'
        no file './lazy.so'
        no file '/usr/local/lib/lua/5.1/lazy.so'
        no file '/usr/lib64/lua/5.1/lazy.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        /home/user/.config/nvim/init.lua:17: in main chunk

I using gentoo in rolling release with latest software

Error detected while processing /home/user/.config/nvim/init.lua:

Hi,i try install Nvchad but...

Error detected while processing /home/mano/.config/nvim/init.lua:
E5113: Error while calling lua chunk: vim/_init_packages.lua:0: module 'vim.uri' not found:
        no field package.preload['vim.uri']
        no file './vim/uri.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1/vim/uri.lua'
        no file '/usr/local/share/lua/5.1/vim/uri.lua'
        no file '/usr/local/share/lua/5.1/vim/uri/init.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/vim/uri.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/vim/uri/init.lua'
        no file './vim/uri.so'
        no file '/usr/local/lib/lua/5.1/vim/uri.so'
        no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/vim/uri.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file './vim.so'
        no file '/usr/local/lib/lua/5.1/vim.so'
        no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/vim.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        vim/_init_packages.lua: in function '__index'
        vim/loader.lua: in function <vim/loader.lua:0>
        [C]: at 0x556e1264c190
        [C]: in function 'require'
        vim/_init_packages.lua: in function '__index'
        .../mano/.local/share/nvim/lazy/lazy.nvim/lua/lazy/init.lua:61: in function 'setup'
        /home/mano/.config/nvim/init.lua:17: in main chunk
E484: Can't open file /usr/local/share/nvim/syntax/syntax.vim

I don't understand what's happening

System-wide nvchad for 2.5

In previous 2.0 I could install nvchad systemwide. to benefit of shared initial configs, mappings... for many users. But I am having troubles with 2.5. Maybe I am lazy, but do you have any idea about how can I get it working again.

I get:

Error detected while processing /etc/xdg/nvim/sysinit.vim[2]../etc/xdg/nvim/NvChad_starter/init.lua:
Failed to run `config` for NvChad

/etc/xdg/nvim/NvChad_starter/init.lua:24: module 'options' not found:
^Ino field package.preload['options']
cache_loader: module options not found
cache_loader_lib: module options not found
^Ino file './options.lua'
^Ino file '/usr/share/luajit-2.1.0-beta3/options.lua'
^Ino file '/usr/local/share/lua/5.1/options.lua'
^Ino file '/usr/local/share/lua/5.1/options/init.lua'
^Ino file '/usr/share/lua/5.1/options.lua'
^Ino file '/usr/share/lua/5.1/options/init.lua'
^Ino file './options.so'
^Ino file '/usr/local/lib/lua/5.1/options.so'
^Ino file '/usr/lib/x86_64-linux-gnu/lua/5.1/options.so'
^Ino file '/usr/local/lib/lua/5.1/loadall.so'

the tree of /etc/xdg/nvim is:

.
โ”œโ”€โ”€ NvChad_starter
โ”‚ย ย  โ”œโ”€โ”€ LICENSE
โ”‚ย ย  โ”œโ”€โ”€ init.lua
โ”‚ย ย  โ””โ”€โ”€ lua
โ”‚ย ย      โ”œโ”€โ”€ README.md
โ”‚ย ย      โ”œโ”€โ”€ chadrc.lua
โ”‚ย ย      โ”œโ”€โ”€ configs
โ”‚ย ย      โ”‚ย ย  โ”œโ”€โ”€ conform.lua
โ”‚ย ย      โ”‚ย ย  โ”œโ”€โ”€ lazy.lua
โ”‚ย ย      โ”‚ย ย  โ”œโ”€โ”€ lspconfig.lua
โ”‚ย ย      โ”‚ย ย  โ”œโ”€โ”€ null-ls.lua
โ”‚ย ย      โ”‚ย ย  โ””โ”€โ”€ overrides.lua
โ”‚ย ย      โ”œโ”€โ”€ highlights.lua
โ”‚ย ย      โ”œโ”€โ”€ mappings.lua
โ”‚ย ย      โ”œโ”€โ”€ myinit.lua
โ”‚ย ย      โ”œโ”€โ”€ options.lua
โ”‚ย ย      โ””โ”€โ”€ plugins
โ”‚ย ย          โ”œโ”€โ”€ init.lua
โ”‚ย ย          โ””โ”€โ”€ myplugins.lua
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ sysinit.vim

sysinit.vim is:

set runtimepath+=/etc/xdg/nvim/NvChad_starter
source /etc/xdg/nvim/NvChad_starter/init.lua

Nv term padding

In NvChad v2.5, I currently don't see any left padding for it(NvTerm)

Change LICENSE to a permissive one

First I want to clear out: I absolutely agree that the main NvChad project is under GPL or whatever license you prefer to protect your work under the open source philosophies!

But this starter configuration is intended to be a skeleton for the user configuration to make use of NvChad. Most users will have much more self written code than provided code from this repository. Therefore I think the starter config should be under a more permissive license.

I'm especially concerned about adding my self-written lua_snippets into a GPL protected configuration, because I cannot estimate how the license inheritance will affect the resulting code when I use the snippets.

For this starter configuration I would recommend a public-domain-equivalent license, e. g.:

I think something like MIT to have attribution would also be fine.

Not possible to move plugin configs to `plugins/`?

Hi, I'm puzzled that moving plugin configs from lua/configs/ to lua/plugins/ breaks the profile and give me the error like (same error for all other plugin configs, I'm just listing one of them):

Invalid spec module: `plugins.lspconfig`                                                                                                           
Expected a `table` of specs, but a `boolean` was returned instead 

File structure after moving (basically just moving plugin configs to the same folder with plugins/init.lua:

.
โ”œโ”€โ”€ init.lua
โ”œโ”€โ”€ lazy-lock.json
โ”œโ”€โ”€ LICENSE
โ””โ”€โ”€ lua/
   โ”œโ”€โ”€ chadrc.lua
   โ”œโ”€โ”€ configs/
   โ”œโ”€โ”€ mappings.lua
   โ”œโ”€โ”€ options.lua
   โ””โ”€โ”€ plugins/
      โ”œโ”€โ”€ cmp.lua
      โ”œโ”€โ”€ conform.lua
      โ”œโ”€โ”€ init.lua
      โ”œโ”€โ”€ lazy.lua
      โ””โ”€โ”€ lspconfig.lua

and I changed all the require statements in plugins/init.lua like this:

-- prev
require "configs.lspconfig"
-- now
require "plugins.lspconfig"

And the require statement in init.lua (but I didn't get any error about lazy.nvim's config, only specs of other plugins):

-- prev
local lazy_config = require "configs.lazy"
-- now
local lazy_config = require "plugins.lazy"

Appreciate for any information about how this may come from!

Windows install hickup

Hi,

For one of my windows machines the installation worked flawless, for this one i am facing issues though:
E5113: Error while calling lua chunk: C:\Users\Name\AppData\Local\nvim\init.lua:17: module 'lazy' not found: no field package.preload['lazy'] no file '.\lazy.lua' no file 'C:\Program Files\Neovim\bin\lua\lazy.lua' no file 'C:\Program Files\Neovim\bin\lua\lazy\init.lua' no file '.\lazy.dll' no file 'C:\Program Files\Neovim\bin\lazy.dll' no file 'C:\Program Files\Neovim\bin\loadall.dll' stack traceback: [C]: in function 'require'
Prerequisites are installed

Italic comment does not work

Hi, I'm trying out this new version of NvChad config. One immediate thing I noticed is that when I tried to uncomment the lines and enable italic comments in chadrc.lua, it simply did not work :x

Following the instructions, this repo clones v2.0 branch of base46

Hi, maybe I'm doing something wrong, but fetching this repo and letting it all do the magic seems to clone the v2.0 branch of base46 instead of the newly released 2.5 under lazy/base46.

Trying to force the branch to v2.5 results in "module 'nvconfig' not found" error, so it looks like this starter repo is still made to work with 2.0, right?

Thanks and keep up the great work :)

How to configure the default plugins?

NvChad has created a starter repo to make it easier to install NvChad and clearer to add other plugins, but how can I disable some default plugins or just use my setup options for these plugins?

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.