Commit Graph

2732 Commits

Author SHA1 Message Date
Christian Brabandt
be5bda1f1d Merge pull request #2526 from pfernandez/patch-1
Changed bufloaded back to buflisted
2022-04-12 18:02:51 +02:00
Paul Fernandez
04bf4eabca
Changed bufloaded back to buflisted
The last PR (#2522) caused some issues for me, and the author @KSR-Yasuda suggested that this change could be the culprit. `__CtrlSF__` and `[No Name]` tabs appearing, and adding them to `airline#extensions#tabline#ignore_bufadd_pat` just made the whole tabline disappear.

I also use the Startify plugin with session saving, and found that when restoring a session, the tabs would no longer appear until I had visited a buffer again, whereas beforehand they would load up a soon as I opened Vim. So I commented out my entire vimrc, and could reproduce this issue by opening an existing session with `vim -S mysession`. Without this fix, only a single buffer from the session is shown in the tabline.

I'm using regular Vim, version 8.2 on MacOS 12.3.1.
2022-04-11 10:54:01 -07:00
Christian Brabandt
904979339c
fix ci test for tabline 2022-04-08 14:20:02 +02:00
Christian Brabandt
98027a4680
Merge pull request #2522 from KSR-Yasuda/bugfix/TabLine/WrongTabLabel
tabline: Fix tab label being named wrongly
2022-04-07 18:55:00 +02:00
yasuda
35af3bf37f tabline: Fix tab label being named wrongly
- Manage `nobuflisted` windows together
    - If a tab has no `buflisted` window,
      the tab label is named from default buffer name.
- Fix default buffer name selection from wrong tab
    - It has picked up default buffer name from active tab,
      not from the target tab.
2022-04-07 09:09:45 +09:00
Christian Brabandt
dc65eea5d9
Merge pull request #2521 from foonathan/master
Don't use flags in spell when spelllang disabled
2022-03-30 10:21:59 +02:00
Jonathan Müller
927e142e94 Don't use flags in spell when spelllang disabled
In vimscript, `0 ==? 'foo'` is true, as it converts the string to a
number which results in 0 for non-numeric strings.
2022-03-29 22:50:13 +02:00
Christian Brabandt
a306a7abfd
Merge pull request #2514 from patricknraanes/main
Enable display country flag instead of spelllang
2022-03-23 20:58:16 +01:00
Christian Brabandt
1b245800b5
Merge pull request #2516 from brandon-doornbos/master
Fix typo/wording in doc
2022-03-23 20:57:18 +01:00
Christian Brabandt
0f237d8b6b
ci: correctly checkout vim-flavor using https://
Currently, the CI throws:

The unauthenticated git protocol on port 9418 is no longer supported.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.

So update vim-flavor to 4.0.1 which uses https:// links instead of
un-authenticated git protocol. Unfortunately, we have to update ruby to
version 3.0 with that.

Let's see if this works.
2022-03-23 20:44:44 +01:00
Christian Brabandt
1d486430cc
neovim: support global statusline and do not truncate too early
With Neovims recent merge of a global statusline (e.g. a statusline that
is the same across all windows), make sure that truncation only happens,
by checking the complete terminal window width instead of using the Vim
window width (similar to when using g:airline_statusline_ontop).

related: #2517
2022-03-23 19:40:21 +01:00
Brandon Doornbos
e643f9fa7d Fix typo/wording in doc 2022-03-07 23:05:53 +01:00
patricknraanes
2706bdc949 Enable display country flag instead of spelllang 2022-02-28 17:29:47 +01:00
Christian Brabandt
e2498d72dc
taglist: avoid v:true/v:false 2022-02-28 15:47:24 +01:00
Christian Brabandt
24f2878080
mode: add several new modes
fixes #2499 #2498
2022-02-28 15:47:24 +01:00
James Rowe
031e6ee4b2
unicode: Trivial quote change for vint error 2022-02-28 15:47:24 +01:00
James Rowe
21cdbea7e6
unicode: Fix check for :UnicodeTable buffer 2022-02-28 15:47:24 +01:00
Adrian Trunzo
d1f6514cef
Test for the correct fern loaded variable. 2022-02-28 15:47:24 +01:00
Jeff Pitman
20d77c3220
builder: bugs in is_empty_section
The current way to parse the statusline content and decide whether a
section is empty, has some flaws:

That is for the following reasons:
- accents are considered to be empty (which they really shouldn't)
- manually parsing the expressions using a
  `:while ... matchlist() ... endwhile` loop is slow and fragile
- grouping items such as %( %) are not considered

So replace the logic by using `substitute('pat', '\=add()', '')` to
capture all single expression groups into a list and then looping over
those to decide whether the section is empty.

fixes #2411
2022-02-28 15:47:24 +01:00
kazukazuinaina
64908db62a
[fix] Fix meaningless tests. 2022-02-28 15:47:23 +01:00
Ilia Choly
9a3568b815 nvimlsp: use vim.diagnostic.get() if available 2021-12-10 14:51:19 -05:00
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
Christian Brabandt
65a4d4dd43
Merge pull request #2464 from TamaMcGlinn/master
Add support for flog with git status summary
2021-11-26 10:27:33 +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
Christian Brabandt
f678b4c53d
Merge pull request #2471 from capt8bit/taglist_earlier_check
taglist: load taglist variants only once
2021-11-25 17:30:02 +01: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
Christian Brabandt
47bf6b1716
Merge pull request #2460 from indelog/indelog_taglist
Add extention to support yegappan/taglist
2021-11-11 15:06:32 +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
Fedor
69726073ca
Add documentation 2021-11-03 23:05:05 +03: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
IK
ddaf69804a
Merge pull request #2446 from vim-airline/fix-assertion-roulette
[fix] assertion roulette in test
2021-11-03 16:14:50 +09:00
Christian Brabandt
86a8ac0f96
Merge pull request #2451 from barn/master
Add vim-rufo extension support to section z.
2021-11-02 21:54:24 +01: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
kazukazuinaina
2b260aabfe [fix] extensions_default's assertion rulette 2021-10-27 01:11:20 +09:00
kazukazuinaina
c9820b0378 [fix] assertion roulette 2021-10-10 19:52:02 +09: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