Closed pmatulis closed 8 months ago
The installation instruction of this plugin are addressed to plugin managers that work in lua, that is, you should have an init.lua
rather than an init.vim
: what plugin manager are you using? The require
instruction should have given you errors if used in a vimscript file.
Please choose a specific plugin manager and follow the appropriate instructions to install the plugin: if you still see problems feel free to get back to the issue, however please ascertain first that your neovim configuration works.
I have a hybrid configuration - some Vimscript and some Lua. My plugin manager is vim-plug.
Then you need to wrap lua imports in vimscript code: the instruction require
isn't loaded because it isn't vimscript code.
Please refer to general instructions on how to include lua configurations via using vimscript and vim-plug. Afterwards check that the plugin is correctly loaded with :PlugStatus
- if the plugin is loaded then it should work, if otherwise check if the mappings are correctly assigned via :verbose map <leader>sn
(and likewise for the rest).
Yes, I'm doing that:
lua << EOF
require("lualine-conf")
.
.
.
require("nvim-possession-conf")
EOF
Command :verbose map <leader>sn
results in No mapping found
.
Command :verbose map
sn results in No mapping found.
then this means that the configuration didn't take effect. Did you run :PlugStatus
, is the plugin installed at all?
Yes, it is installed.
If I deliberately create an error in the first line of the plugin's configuration file I get an error when starting up my neovim:
requir('nvim-possession').setup({
(the missing 'e' in "require")
However, applying the strategy to the rest of the file does not give me an error. There is something with the configuration structure (?) that is not right.
However, applying the strategy to the rest of the file does not give me an error. There is something with the configuration structure (?) that is not right.
This would then depend on how you are configuring your neovim. Notice that the plugins instructions that you copied refer to installation via the plugin manager lazy.nvim (as specified in the README): if you are using vim-plug then you have to install the plugin differenty (and to do so please refer to the specific installation instructions of lua plugins via vim-plug, I don't really know how such plugin deals with lua code).
P. S. Given you are using vim-plug I wonder if the other plugins work? They cannot work either if you just copy installation instructions that refer to other plugins :)
All the many other plugins work fine. Yours is the only one that needs mappings created using Lua. I will dig into it. Thanks for your guidance.
I have in my
init.vim
:let mapleader=" "
require("nvim-possession-conf")
This file's contents is:
The leader is set to.
Starting nvim is error-free.
I'm expecting
<space>sn
or<space>sl
to give me results (new or list) but it appears that the key mappings are not set. Apologies if this is a generic config problem. My other plugins show how to do things with vimscript.