Comments (19)
can you show your exact custom/plugins
file? And to be clear, you put it in custom/plugins
not costom/plugins
right?
from kickstart.nvim.
Sorry for the late reply. Had the chance to try this on a different machine today... It works just fine!
I assume PEBKAC on my last attempt - sorry for the inconvinience!
from kickstart.nvim.
No problem at all :) have a good day
from kickstart.nvim.
I'm seeing the exact same behaviour here.
My $HOME/.config/nvim/custom/plugins.lua:
return function(use)
use({
'nvim-tree/nvim-tree.lua'
config = function()
require("nvim-tree").setup()
'nvim-tree/nvim-web-devicons'
end
})
from kickstart.nvim.
I think the file needs to be located at
$HOME/.config/nvim/lua/custom/plugins.lua
from kickstart.nvim.
Yes, sorry - my mistake... :(
from kickstart.nvim.
However, it would seem that the custom/plugins.lua is only read for config of the plugin. Packer doesn't seem to see any plugins included in it...
I now have 3 plugins configured in it:
return function(use)
-- Configure nvim-tree
use({
'nvim-tree/nvim-tree.lua'
config = function()
require("nvim-tree").setup()
'nvim-tree/nvim-web-devicons'
end
-- Add friendly snippets
use({
'rafamadriz/friendly-snippets'
config = function ()
require("friendly-snippets").setup()
end
})
end
and it never installs 'friendly-snippets', and if I run PackerSync manually it always asks if it can remove the unused nvim-tree plugins... (which were installed when I had them in init.lua, which was when I had the wrong path to my custom/plugins.lua)
It does read the nvim-tree config though, since I can create a keymap for it in my after/plugin/defaults.lua...
What am I doing wrong?
from kickstart.nvim.
Hi @jby,
It works fine for me, have you tried :PackerInstall
(before:PackerSync
)?
Also, for PackerSync always asking to remove the old nvim-tree, you can try to delete this folders:
~/.config/cache/nvim
It will rebuild it the next time you launch neovim.
EDIT: also for friendly-snippets to be taken into account by luasnip you have to replace the line require('friendly-snippets').setup()
whith require('luasnip.loader.from_vscode').lazy_load()
.
from kickstart.nvim.
I'd guess it's these (rather than ~/.config/cache/nvim, especially since I don't have a cache dir in ~/.config) that I should remove?
However a :PackerInstall does nothing...
from kickstart.nvim.
I'm pretty sure though, that if I were to remove the above I would no longer have the nvim-tree plugin installed...
from kickstart.nvim.
You can remove ~/.local/share/nvim
, it will reset your config and reinstall everything (you may have to restart neovim a couple of time for everything to be set up).
I don't knwow if the custom/plugins.lua
you showed is only a snippet or the entire file. If it is the entire file, a })
is missing, also nvim-web-devicons
should be required. Here is the file with the corrections :
return function(use)
-- Configure nvim-tree
use({
{'nvim-tree/nvim-tree.lua', requires = 'nvim-tree/nvim-web-devicons'},
config = function()
require("nvim-tree").setup()
'nvim-tree/nvim-web-devicons'
end
})
-- Add friendly snippets
use({
'rafamadriz/friendly-snippets'
config = function ()
require("luasnip.loaders.from_vscode").lazy_load()
end
})
end
from kickstart.nvim.
Ok, thanks - but still - no install of the plugins in the custom file.
I did remove ~/.local/share/nvim and when I restarted it re-installed everything again - but not the plugins in the custom file:
from kickstart.nvim.
Albeit it does look for it since I've configured it...
Error detected while processing /Users/jonasb/src/jby/nvim/after/plugin/defaults.lua:
E5113: Error while calling lua chunk: /Users/jonasb/src/jby/nvim/after/plugin/defaults.lua:4: module 'nvim-tree' not found:
no field package.preload['nvim-tree']
no file './nvim-tree.lua'
no file '/usr/local/share/luajit-2.1.0-beta3/nvim-tree.lua'
no file '/usr/local/share/lua/5.1/nvim-tree.lua'
no file '/usr/local/share/lua/5.1/nvim-tree/init.lua'
no file '/Users/jonasb/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/nvim-tree.lua'
no file '/Users/jonasb/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/nvim-tree/init.lua'
no file '/Users/jonasb/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/nvim-tree.lua'
no file '/Users/jonasb/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/nvim-tree/init.lua'
no file './nvim-tree.so'
no file '/usr/local/lib/lua/5.1/nvim-tree.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/Users/jonasb/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/nvim-tree.so'
stack traceback:
[C]: in function 'require'
/Users/jonasb/src/jby/nvim/after/plugin/defaults.lua:4: in main chunk
from kickstart.nvim.
So - the ~/.config/nvim/after/plugin/defaults.lua definitively is read, but apparently not the ~/.config/nvim/lua/custom/plugins.lua
from kickstart.nvim.
Hmm, my ~/.config/nvim/lua/custom/plugins.lua
doesn't even seem to be read even if I ignore the logic that's supposed to look for it and manually specify it in init.lua
like this:
(require 'custom.plugins')
My ~/.config/nvim/lua/custom/plugins.lua
now:
return function(use)
-- Configure nvim-tree
use({
{'nvim-tree/nvim-tree.lua', requires = 'nvim-tree/nvim-web-devicons'},
config = function()
require("nvim-tree").setup()
'nvim-tree/nvim-web-devicons'
end
})
-- Add friendly snippets
use({
'rafamadriz/friendly-snippets',
config = function ()
require('luasnip.loader.from_vscode').lazy_load()
end
})
-- // Comment.nvim
use {
'numToStr/Comment.nvim',
config = function()
require('Comment').setup()
end
}
end
from kickstart.nvim.
The only way, so far I get the plugins I want to add to actually be installed and used is to add them to init.lua
...
Doesn't that kind of make the custom.plugins
rather useless?
from kickstart.nvim.
Doesn't that kind of make the
custom.plugins
rather useless?
Sure but it seems that you are the only one with this problem, I'm sorry, I'm running out of ideas.
from kickstart.nvim.
I kind of feel like I've hi-jacked someone else's, already closed, issue here. Maybe I should create my own instead?
from kickstart.nvim.
Created #176 instead
from kickstart.nvim.
Related Issues (20)
- stevearc/conform plugin format not working for golang
- Post-installation crash/hang on v0.9.5 HOT 9
- WhichKey conflicting keymaps warning HOT 4
- init.lua changes all single quotes to double quotes on first save HOT 9
- Newb question: Where do I file a bug for the autocomplete for CSS files? HOT 3
- Kickstart calls `kickstart-lsp-highlight` augroup regardless of support HOT 8
- I don't know what this error is HOT 17
- Gitsignes errors whenever there is not a git repo in the parent folder. HOT 3
- Error in loading the kickstarter config in kali WSL package. HOT 2
- How to install this HOT 5
- Align color scheme with kitty HOT 5
- Initial start causes OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 0 on plugin install on Windows HOT 5
- References highlight blinks every time the cursor is moved HOT 5
- LSP for html config HOT 8
- Telescope bindings don't work. HOT 11
- How do I add language specific LSP keymaps? HOT 6
- Language server does not install using termux on android HOT 1
- Language servers removed from `servers` table still take affect HOT 3
- telescope(?) issue in `init.lua` HOT 6
- Can we please enable DISCUSSIONS on this repo? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kickstart.nvim.