Skip to main content

Questions tagged [plugin-system]

For questions about Vim's plugin system. NOT for questions about a specific plugin (use the appropriate plugin-* tag) or questions that may require a plugin.

Filter by
Sorted by
Tagged with
1 vote
1 answer
24 views

How to save reference to function before overriding it?

I want to modify the behaviour of an existing plugin (without forking it), such that whenever a particular function plugin_name#foo() is called, my added behaviour is run afterwards. In some ...
TamaMcGlinn's user avatar
1 vote
1 answer
43 views

Issue with :PlugInstall command in Vim (not an editor command)

I'm encountering an issue with the :PlugInstall command in Vim and would appreciate some guidance on how to resolve it. Problem: When attempting to run :PlugInstall, Vim responds with not an editor ...
Diego's user avatar
  • 21
0 votes
0 answers
105 views

How to make all source selector visible in neo tree

I'm trying to use neo-tree.nvim for file viewing purpose. My complete neovim configuration is here local Icons = { diagnostics = {error = "", warn = "", hint = "", ...
Rajkumar Natarajan's user avatar
0 votes
1 answer
2k views

Simplest setup for nvim and rust and system rust-analyzer

All the tutorials that I found to use nvim with rust-analyzer either suggest using Packer (which is unmaintained since August), vim plugin managers (I really want to avoid anything vimscript, it's ...
Olivetree's user avatar
  • 103
1 vote
2 answers
95 views

How to noremap plugin functions that take arguments?

I am aware that it is good practice to map some plugin function, like for example the piece of code that follows (Vim9): import autoload "../lib/my_script.vim" noremap <unique> <...
Barzi2001's user avatar
  • 550
1 vote
1 answer
87 views

Getting an error message when triggering plugin load with vim-plug

I'm new to the world of plugins, and have just installed vim-plug (well, sort of). My .vimrc has: call plug#begin() Plug 'vim-airline/vim-airline', { 'on': 'Airline' } call plug#end() ... since I ...
einpoklum's user avatar
  • 111
0 votes
4 answers
147 views

Check if a script is sourced

I use quite a number of plugins now and the init.vim script for nvim has become quite unwieldy. So I started separating out the individual configuration files for each individual plugin. And now I ...
FalcoGer's user avatar
  • 149
0 votes
1 answer
43 views

My plugin got sourced first before init.lua

I make a colorscheme plugin with vimscript (the code sucks, as I've never write a plugin before), there it checks if a global var exist or not. " nvim-colors/colors/kalm.vim ... if !exists('g:...
manungsa's user avatar
1 vote
1 answer
32 views

How to use tmap with <Plug>?

I am wondering how shall I use tmap along with <Plug>. Here is a snippet of the context where I am using it: vim9script import autoload "../lib/foo.vim" noremap <unique> <...
Barzi2001's user avatar
  • 550
0 votes
1 answer
105 views

Hide the list of plugins show almost each time at a file open [closed]

When I open some file I see a list of plugins shown on the whole window (screenshot below). I get tired of wasting my time to press few keys to hide this list: several times Space each time. No error ...
Artyom's user avatar
  • 127
0 votes
0 answers
553 views

I get several deprecation warnings printed, how to disable them?

I see this when I open first file in nvim. I have not much to do with these (those are plugins that I didn't write). How can I disable them being printed to console? sumneko_lua is deprecated, use ...
eyal karni's user avatar
  • 1,106
0 votes
0 answers
70 views

Plugin function scope issue

I have recently discovered this guide that was very eye opener under many aspects. So I decided to do things "by the book" by moving my plugins in ~/.vim/pack/bundle/start/myplugin/plugin/...
Barzi2001's user avatar
  • 550
1 vote
1 answer
580 views

When to use "set exrc" and local '.vimrc' in Vim, and how to manage plugins with multiple 'vimrc' files for large projects?

I'm using Vim for a project that has a lot of pages per chapter, and Vim is a little bit slow. I want to create a local '.vimrc' file for this project with only the plugins I need, and I'm trying to ...
Mafsi's user avatar
  • 225
0 votes
1 answer
2k views

How to include/configure lua_ls on lspconfig?

I am trying to include lua_ls on my lspconfig but I am getting this error [lspconfig] Cannot access configuration for lua_ls. Ensure this server is listed in `server_configurations.md` or added as a ...
zer09's user avatar
  • 199
0 votes
1 answer
389 views

How to set the ALE configuration `g:ale_exclude_highlights`?

I use ALE to check coding style, but I want to ignore the warning type:line too long, like this picture: And I find the related setting g:ale_exclude_highlights, this is its explanation in :help ale :...
theabc50111's user avatar
1 vote
1 answer
29 views

Does `.rc` do anything in `after/plugin/foo.rc.vim`?

I see some people add a .rc. extention to files in after/plugin, is there any difference between: after/plugin/foo.vim after/plugin/foo.rc.vim ? Or: after/plugin/bar.lua after/plugin/bar.rc.lua ?
run_the_race's user avatar
0 votes
1 answer
18 views

Why does the help suggest to end the lhs of a plug mapping with a semicolon?

In :help using-<Plug> a suggestion is given as to how to name the left hand side of a <Plug> mapping: To make it very unlikely that other plugins use the same sequence of characters, use ...
Enlico's user avatar
  • 2,194
0 votes
2 answers
114 views

How can I check whether the user has defined a highlight group before Vim 8.2.3917

With this question I've learned of the existence of hlget and hlID, which I use in a plugin of mine like this: if empty(hlget('SoftWrapHighlightGroup')) " do stuff endif However, those ...
Enlico's user avatar
  • 2,194
1 vote
2 answers
125 views

How do I let the user of my plugin customize a custom highlight group I define?

In this plugin for (soft-)wrapping only the current line, I have defined a highlight group, au ColorScheme * hi SoftWrapHighlightGroup ctermbg=NONE ctermfg=NONE, which I use here as an argument to a ...
Enlico's user avatar
  • 2,194
1 vote
1 answer
94 views

Remove all leader mappings before creating my own

The question pretty much sums it up: Is there a way to clear all of the <leader> mappings set by plugin authors before proceeding to set my own custom mappings? The only way I've seen to do this ...
apostl3pol's user avatar
2 votes
1 answer
5k views

How to install LunarVim on Windows?

I am installing LunarVim on Windows using the official docs available at: https://www.lunarvim.org/docs/installation I run: bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/...
Syed M. Sannan's user avatar
1 vote
1 answer
954 views

Aligning variables and comments in vim

I've looked for this since a long time but I can't seem to find anything relating to this. It could be because of my poor searching skills. Whenever the code starts getting long, its obvious that we ...
Diwas10's user avatar
  • 115
0 votes
1 answer
622 views

How can I install fzf in vim without using a plugin manager? [duplicate]

I have fzf installed in manjaro (/usr/bin/fzf, /usr/share/fzf), but I can't seems to figure out how to install fzf for vim. I'm having trouble following these instructions: https://github.com/junegunn/...
andrew_ysk's user avatar
2 votes
1 answer
168 views

How does Vim execute a plugin?

What is the plugin system ? I could not find answers how the plugins are actually loaded/executed in Vim. I know that Vim looks for them in specific locations. I also found this question about what an ...
noobman's user avatar
  • 23
5 votes
0 answers
237 views

Issue when moving Vim9script plugin's functions to autoload

I've read :help write-plugin to understand a bit more about how to write a plugin in Vim9script, but there aspects of that that puzzle me. Here's a very simplified, working version of the example ...
Enlico's user avatar
  • 2,194
0 votes
0 answers
22 views

Plug-in to create comment layer

Is there any plug-in where you can write text without being in insert mode but it’s not being written to the actual file? If you enter insert mode, all that comment text disappears. It should be in a ...
Julius Hamilton's user avatar
0 votes
0 answers
198 views

How portable is my $HOME/.vim directory?

I'm at home on a few unixy systems, FreeBSD/amd64, Linux/amd64 and Solaris/Sparc. I would like my ~/.vim directory as portable as possible, ideally in such a way I can keep them identical (say, rsync ...
Jens's user avatar
  • 363
0 votes
1 answer
51 views

If I change the name of my plugin, will it cause issues for existing users?

I've recently released vim-surround-funk, which was inspired by tpope's vim-surround. Originally, I was calling it surround-funk.vim, but I changed the name to be more consistent with vim-surround's ...
mattb's user avatar
  • 1,131
1 vote
1 answer
61 views

Prevent plugins from loading if python not found

I'm working on a server that has various different python installations set up. At any one time, only one will be accessable and working, depending on what I am working on. Some are python2, some ...
Clumsy cat's user avatar
1 vote
1 answer
4k views

Where are neovim's cached, file-specific settings?

Vim has a ~/.vim/view/ directory for storing file-specific settings, such as saved cursor position and any command manually ran while viewing a file. Sometime, when I would update and source my vimrc, ...
Eli's user avatar
  • 13
1 vote
1 answer
925 views

Vimscript - Loading function(s) from another .vim file

I'm forking an old vim plugin (effectively dead since 2018) that needed some love. Once I got to the .vim file, I noticed that the functions were all defined in there, which made the file unreasonably ...
gabca's user avatar
  • 11
0 votes
1 answer
180 views

Vim Inside Docker Container Doesn't Recognise Plugins via Vim 8's Own Plugin System

I'm trying to move my development environment into a Docker container to better manage my dependencies. Hence, I need Vim inside that container as well: git clone https://github.com/vim/vim.git &&...
Can Sürmeli's user avatar
1 vote
0 answers
58 views

bufexplorer.vim plugin doesn't load

I installed ubuntu-20.04.3-desktop-amd64.iso on VirtualBox 6.1.28. It is my first foray into virtual machines and Linux. I installed Vim 8.1 according to this page. The :scriptnames command shows ...
user2153235's user avatar
0 votes
2 answers
187 views

project-based config: how to load plugins/colors from custom subdir of $PWD when doing `vim -u local/vimrc ...`?

The Need, the Goal... By "project-based config" I mean a project contained in a git repo that contains all the vim configuration -- vimrc and plugins and colorschemes -- right there in the ...
alec's user avatar
  • 795
0 votes
1 answer
671 views

Should the filetypedetect augroup be used in plugins?

I'm writing my first Vim/Neovim plugin, which improves support for files managed by yadm. Pretty straightforward. However, while reading other plugins for inspiration, I have noticed that plugin ...
John Karahalis's user avatar
0 votes
2 answers
182 views

cryptic error since Big Sur upgrade, :PlugInstall doesn't work, and none of my plugins work

Error: Error detected while processing BufWinEnter Autocommands for "*"..function <SNR>3_LocalVimRC[322]..BufWinEnter Autocommands for "*"..function <SNR>3_LocalVimRC: ...
Sophie McCarrell's user avatar
0 votes
0 answers
34 views

Creating vimrc kills my plugin

I have the following ~/.vim/filetype.vim: augroup filetypedetect au BufRead,BufNewFile *?Script.sml let maplocalleader = "h" | source /home/gergely/HOL/tools/vim/hol.vim " recognise ...
Gergely's user avatar
  • 293
1 vote
2 answers
117 views

Open buffer without loading ftplugins

I have huge file and quite slow plugin (loaded by vim-plug) for corresponding filetype. I want following: Plugin is loaded by default Option to fast open this file without loading plugin. Something ...
petRUShka's user avatar
  • 243
1 vote
0 answers
51 views

Measurement/ tracking the time for editing a file (overall and statistics)

I use vim for coding and also for writing scientific articles and book chapters. It would be very interesting to know the time I spent on a file. For example how many hours or minutes the buffer was ...
Robert Winkler's user avatar
0 votes
1 answer
128 views

Global plugins source only once? [closed]

So here is a little experiment: with a clean config (i.e., no previous ~/.vimrc or ~/.vim/), do: $ mkdir -p ~/.vim/plugin/ $ vim ~/.vim/plugin/foo.vim And in that file, enter the following, save &...
wmnorth's user avatar
  • 123
2 votes
0 answers
228 views

Highlight groups stop working after sourcing vimrc

I'm working on a todo plugin for Neovim, using the remote plugin API. I set highlight groups and matching patterns in my script, and then register it with call remote#host#RegisterPlugin. When Neovim ...
F'1's user avatar
  • 121
1 vote
1 answer
876 views

Bset language to write a vim plugin? [closed]

Currently we can use many different languages to write a (neo)vim plugin. I heard that the vim language is actually pretty slow which was surprising me. I don't have the links of the websites anymore ...
TornaxO7's user avatar
  • 561
0 votes
1 answer
1k views

Vim-Plug uses wrong directory for plugins

I decided to switch from vim to neovim on a new system. I downloaded nvim, copied my .vimrc to ~/.config/nvim/init.vim and installed vim-plug to ~/.config/nvim/autoload/. At the start of my init.vim I ...
Udalny's user avatar
  • 33
-1 votes
2 answers
2k views

How does one install a VIM plugin without a plugin manager?

I am new to vim, I watched this video and wish to give it a good try for a month to see how I like it. I want to add the NERDTree plugin to my vim, I'm actually using NeoVIM: NVIM v0.4.4 Build type: ...
J86's user avatar
  • 225
0 votes
1 answer
27 views

cannot save raw plug.vim file [closed]

MacOS, I am trying to save plug.vim file by: navigate to https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim Using save file as option to save plug.vim to this location /usr/share/vim/...
Yu Zhang's user avatar
  • 103
0 votes
1 answer
58 views

modules installed again and again

Here is a part of my ftplugin/fortran_state.vim " Check python modules and install{{{1 if !executable('fprettify') || !executable('fortls') || !executable('unidecode') :let choice =confirm(&...
BaRud's user avatar
  • 481
-1 votes
1 answer
1k views

Adding Additional Syntax Highlight to nvim; cannot get .config/nvim/after/syntax to load .vim file

I'm trying to add additional syntax highlighting to a plugin I'm using for syntax highlighting. I've tried adding the additional syntax file fstrings.vim to the ~/.config/nvim/after/syntax folder but ...
Chef1075's user avatar
  • 101
2 votes
2 answers
142 views

Can vim-plug write plugin settings directly to .vimrc?

I am new in using vim-plug. It works fine installing and updating all the plugins configured in .vimrc. But some plugins require some additional settings inside .vimrc to work correctly. Is there a ...
Mountain's user avatar
  • 125
1 vote
1 answer
957 views

Load plugins in vim started with --noplugin

I have my $EDITOR set to vim --noplugin -n -i NONE +star, which is what I usually want when committing with git etc. However, sometimes I decide I need those plugins (the builtin ~/.vim/pack kind, ...
usretc's user avatar
  • 374
-1 votes
2 answers
1k views

annoying red blocks in neovim

im using Neovim from my WSL terminal. I've been exploring the multiple plugins of this amazing open source project and this made me change my init.vim, a lot. Now i've messed it up and i don know how ...
Occhima's user avatar
  • 101

1
2 3 4 5