Commit Graph

1763 Commits

Author SHA1 Message Date
Christian Brabandt
bf5d785932
virtualenv: Enable for additional filetypes beside python
So with https://github.com/jmcantrell/vim-virtualenv you can display the
virtualenv in your statusline section (if you have enabled it). However
it would only become active for python buffers.

Now perhaps you want to show the virtualenv also in other filetypes like
markdown or CI scripts, so allow this by adding a variable
`airline#extensions#virtualenv#ft'` to the list of filetypes you want to
have enabled. So set:

    let g:airline#extensions#virtualenv#enabled = 1
    let g:airline#extensions#virtualenv#ft = ['python', 'markdown']

To allow displaying the virtual environment for python and markdown
buffers (but remember you need to have the plugin
https://github.com/jmcantrell/vim-virtualenv installed as well!)

fixes #2483
2021-12-08 11:23:42 +01:00
Gauravsingh Sisodia
8e36c0a8ed
main: ignore popup windows for inactive windows
When openning popup (vim) or floating (neovim) windows,
do not consider those windows for disabled windows. That is, leave the
main window in activate state instead of marking it disabled

closes: #2387
2021-12-05 19:05:15 +01:00
Christian Brabandt
de73a21903
tabline: Give error message, if switching buffers is not possible
When using Neovim and switching to another buffer with the mouse and the
current buffer is modified, Vim refuses to switch buffers rightfully,
if the user has not set 'hidden' or 'autowrite' (because it is going to
unload the buffer from memory).

So catch this case and let the user know.

Note: :b! would be another possibility, but I do not prefer using this
attribute, because it is not clear what happens to the current buffer. I
think it is made hidden, but I prefer to be explicit here

closes #2478
2021-12-05 18:52:27 +01:00
Christian Brabandt
841a355196
Merge pull request #2472 from indelog/indelog_vim9lsp
Add extension for yegappan/lsp
2021-11-26 10:31:26 +01:00
Indelog
8df0f3db4b Add extention for yegappan/lsp
Show errors and warnigs with yegappans/lsp plugin.
2021-11-26 10:12:11 +01:00
Tama McGlinn
2ed11e9536 Add support for flog with git status summary 2021-11-25 18:09:40 -05:00
Michael Monsivais
6716572b30 taglist: load taglist variants only once
Because Tlist_Get_Filenames() only exists within yegappan/taglist,
TlistUpdate was being envoked on every call when using other taglist
versions.(Like vim-scripts/taglist.) This caused visual artifacts and
slowdowns.

We now check for a function from both taglist variants to see if either
one has been loaded.
2021-11-19 10:15:15 -07:00
Christian Brabandt
4b96f58902
Merge pull request #2462 from KSR-Yasuda/feature/CustomSpellCheckCommand
Custom Spell Check Command Support
2021-11-12 13:06:26 +01:00
Indelog
ec761c2adf
taglist: correctly check for right taglist plugin
Avoid the error `Unknown function: taglist#Tlist_Get_Tagname_By_Line`
when using the old tag tlist plugin in a different way.

this means, we have to revert 5841039679
since exists() does not handle autoloaded functions correctly.

We can only check it, after we have used the taglist plugin, so that the
autoloading has happened. That means, move the exists() call after the
`:TListUpdate` call which will correctly autoload taglist and then
exists() can check for the existence of the
`taglist#Tlist_Get_Tagname_By_Line()` function correctly.

closes: #2463
2021-11-12 13:04:45 +01:00
Christian Brabandt
5841039679
taglist: check that correct function exists
So 47bf6b1716 added support for
yegappan/taglist plugin, but unfortunately the old (deprecated)
vim-scripts/taglist.vim repo still exists and this one throws an error
when trying to access taglist#Tlist_Get_Tagname_By_Line

So check, that this function is defined before trying to load the
extension
2021-11-12 09:32:50 +01:00
yasuda
646dd0a1c2 Custom spell check command support
- Add an option `g:airline_spell_check_command`
2021-11-12 11:45:58 +09:00
Christian Brabandt
6e5439126f
wordcount: allow to disable vimtex wordcount()
While Commit e542f5e introduced a nice little feature for TeX files to
accurately count words, this unfortunately has the drawback of being
possibly slow, especially since the statusline is often re-evaluated.

Therefore disable this feature by default. You can enable it using:

    :let g:airline#extensions#vimtex#wordcount = 1

fixes #2461
2021-11-11 22:51:02 +01:00
Indelog
d134ae8c2f Add extention to support yegappan/taglist 2021-11-11 14:26:49 +01:00
Christian Brabandt
70904d7070
Merge pull request #2458 from fritzlolpro/patch-1
Allow user to hide CoC status in the section C
2021-11-10 11:24:50 +01:00
Dood of Distinction
e542f5e9d0
Modifies the wordcount to use the vimtex wordcount function when editing TeX files and the vimtex plugin is loaded.
With help from Karl Lervag's suggestion on how to reliably tell when the
above mentioned conditions are the case for the current buffer

Checked to work with other filetypes that use the wordcount in
vim-airline, and these seem to work as before.

Also checked that if two of these filetypes (one TeX and the other
another type, such as markdown) the two coexist peacefully, with TeX
using Karl's wordcount function, and the other using the (I assume)
native wordcount?

Fixed comment wording
2021-11-09 22:02:15 +01:00
Christian Brabandt
17f7dff748
Merge pull request #2457 from ytian81/remove_hunks_dependency_on_branch
Remove gitgutter hunks summary dependency on branch
2021-11-03 20:50:19 +01:00
Fedor
f0ee8f193e
Allow user to hide CoC status in the section C
Hello.
This PR should solve my pain as CoC user, that CoC status takes too much space in the C section, right after the file path. 
It looks like a waste of space on splitscreen or a small screen.

So I added an option to set
g:airline#extensions#coc#show_coc_status = 0
and the status will be hidden. 

By default it works like usual.
2021-11-03 15:27:47 +03:00
Yang Tian
0dd6f5e711 remove gitgutter dependecy on branch 2021-11-03 00:24:08 -07:00
Bea Hughes
6800c9ea7f Add vim-rufo extension support to section z.
Displays whether you have the ruby formatter enabled or not for the
session you are in.

Enable with:
let g:airline#extensions#rufo#enabled = 1

Configure with:
let g:airline#extensions#rufo#symbol = '💎'
2021-11-01 10:36:33 -07:00
Christian Brabandt
26f922753a
coc-extension: remove dead code
vim-airline does not use actually use the `g:coc_stl_format` variable
and it also doesn't seem to be used by coc itself. So let's just remove
this code.

closes #2437
2021-09-21 08:43:30 +02:00
Christian Brabandt
0a7e1bc475
style: Remove colon 2021-09-21 08:43:30 +02:00
wzy
78cb6e6621
Fix bug of g:airline_symbols.spell == '' 2021-08-16 14:41:49 +08:00
zeertzjq
969c13c716 Don't show "gina" in diff buffers if b:gina_initialized is not set 2021-08-07 19:28:15 +08:00
Evan Chen
0f3feca572
Allow overriding trailing ws regexp per buffer
For example, in a github repository, you might want to allow trailing
double spaces in a file, but not elsewhere
2021-08-03 21:35:22 -07:00
kazukazuinaina
ec4bbabe4a [fix] issue #2338
add check airline_stl_path_style's flag and pathshortln api
2021-07-12 02:26:52 +09:00
kazukazuinaina
9b113a02f5 [refactor] use Ternary operator 2021-07-06 02:37:52 +09:00
Christian Brabandt
49cdcb7b3e
vim9: Needs at least version 8.2.22844 2021-06-07 13:44:53 +02:00
Adrian Trunzo
fdda58861b Correct line number for coc.nvim warnings.
- The line number index is 0 for errors, 1 for warnings.
2021-06-03 14:23:44 -06:00
Andrzej Ostruszka
3882146c41 Change event for tabline autoshow
Use TabNew/TabClosed for the "autoshow" event when tabline is used only
for tabs (show_buffers==0).  This fixes case of visible tabline when
tab_min_count == 2 and user executes ':tabonly' command - the tabline
should disappear but there is no TabEnter event triggered in this case.

Closes #2389
2021-05-27 08:29:30 +00:00
Christian Brabandt
b6f6cc9312
autoload: fix error with vim74 2021-05-26 13:26:47 +02:00
Aaron Adams
98aea41dc2
Warn if a function is already registered for inactive statusline
closes #2388
2021-05-26 13:09:04 +02:00
Christian Brabandt
05bd105cab
Merge pull request #2385 from ReubenM/master
Completely customizable linenr, maxlinenr, colnr symbols and strings
2021-05-26 08:02:03 +02:00
Youngjae Lee
affe12b7e7 scrollbar: fix first line overwrite 2021-05-26 10:48:36 +09:00
Christian Brabandt
4a64fbfc4b
scrollbar: disable by default
as per feedback from reddit
2021-05-21 16:10:51 +02:00
ReubenM
ef232cfee1 Update docs 2021-05-19 15:43:23 -05:00
kazukazuinaina
51c79f61f4 [add] winwidth's test 2021-05-14 02:25:14 +09:00
ReubenM
1f94ec1556 Make everything in linenr, maxlinenr, and colnr completely configureable, including spaces and colons. The only thing hard wired anymore is the actual numbers. 2021-05-09 22:12:37 -05:00
Christian Brabandt
ab4962b838
tabline: remove commented out functions, that are not possible in Vim9 2021-05-09 09:20:06 +02:00
Christian Brabandt
4c0c60bbf2
scrollbar: user after variable instead of re-calculating it 2021-05-08 18:50:24 +02:00
Christian Brabandt
ecac148e19
scrollbar: add an ascii scrollbar extension 2021-05-08 18:06:25 +02:00
Christian Brabandt
e7eea7c6e8
vim9: Use correct vim9 lambda functions 2021-05-08 13:55:26 +02:00
Christian Brabandt
a2f298ba8f
vim9: Rewrite highlighter in Vim9 Script
This is the one script, that is usually causing the most slow down.
Converting it to Vim9 Script should keep vim responsive and the users
happy. Hopefully that works now.
2021-05-08 13:36:55 +02:00
Christian Brabandt
7e295c859f
vim9: finish early for legacy Vims
fixes #2382
2021-05-08 09:20:25 +02:00
Christian Brabandt
19360bac63
themes: remove tabs for indenting 2021-05-08 01:42:10 +02:00
Christian Brabandt
7181950501
vim9: rewrite themes.vim to Vim9 Script 2021-05-08 01:39:55 +02:00
Christian Brabandt
e608a0c016
vim9: Rewrite tabline#formatters#default to Vim9Script 2021-05-08 00:48:18 +02:00
Christian Brabandt
725e881ac9
vim9: Convert tabline.vim to vim9 script 2021-05-08 00:27:11 +02:00
Christian Brabandt
c0c6b0e216
tabline: only remove 'e' flag from guioptions, if it is present 2021-05-07 22:50:29 +02:00
Christian Brabandt
23e20bfada
autoload: handle bufnr as string explicitly
This is some preparational work for evetually merging the vim9 script
feature.

Also while at it, remove those nasty `l:` prefixes
2021-05-07 22:46:57 +02:00
Christian Brabandt
db78454a03
symbols: Use a different Column char in UTF-8
Personally I don't like the extra-wide ㏇ char, so let's make it ℅
2021-05-07 22:29:59 +02:00