Commit Graph

1810 Commits

Author SHA1 Message Date
Christian Brabandt
994cfd80eb
Powerline: Mention alternative to notexists symbol
I noticed, that in some environments the default
g:airline_symbols[notexists] just does not show up, even when the same
font in the gui works. So let's at least mention a possible alternative,
that you can easily use in your vimrc:

```vim
  if !exists("g:airline_symbols")
    let g:airline_symbols = {}
  endif
  let g:airline_symbols.notexists = "\u2204"
```
2022-12-15 17:15:15 +01:00
Igbanam Ogbuluijah
2ae1475d0d
add variardic arguments to generate_color_map 2022-12-07 02:28:40 +00:00
Igbanam Ogbuluijah
62847a8cc9
add variardic arguments to get_highlight functions 2022-12-07 02:28:19 +00:00
Zhizhen He
3c9c2ba5d4
fix typo 2022-11-24 11:47:41 +08:00
Christian Brabandt
f65f27b9eb
Merge pull request #2600 from Freed-Wu/fcitx
Add support for fcitx.vim
2022-11-17 16:18:44 +01:00
Wu Zhenyu
1e491727b2
Add support for fcitx.vim
<https://github.com/lilydjwg/fcitx.vim/issues/32>
2022-11-15 17:29:36 +08:00
eximus
b86e5e09b2 Improve coc error/warning status format to include count 2022-11-04 16:37:31 -04:00
Christian Brabandt
364ffba120
Merge pull request #2592 from 3ximus/master
Use the coc status variable to format error/warning text
2022-11-04 13:51:08 +01:00
DEMAREST Maxime
5c682e7bd3 Fix vim9lsp ErrorCount method name change 2022-10-31 19:10:37 +01:00
eximus
d56f199405 Use the coc status variable to format error/warning line number 2022-10-28 14:34:11 -04:00
amarakon
84823e5e7d Treat R Markdown the same as Markdown 2022-10-13 16:53:42 +02:00
amarakon
3fe71a6ce6 Remove trailing whitespace 2022-09-30 23:25:47 -04:00
Shad
dba64a910d
Update util.vim
using getwinvar directly with 7.3 version of vim display the following error
E118: Too many arguments for function: getwinvar
E15: Invalid expression: getwinvar(a:winnr, '&buftype', '') ==# 'popup'
2022-09-26 15:01:40 +02:00
Christian Brabandt
a71f9a6417
Merge pull request #2575 from sartak/section-y-width
Reduce truncation for section y to 80 chars
2022-09-21 09:09:10 +02:00
Shawn M Moore
e0056ae5b0 Reduce truncation for section y to 80 chars 2022-09-20 23:57:06 -04:00
Christian Brabandt
2cea8346cf
plugin: handle sandbox mode gracefully
When the sandbox is active (e.g. while debugging something), certains
commands and expressions are not allowed (see :h sandbox) and may cause
nasty exceptions to be thrown.

So try to catch E48 and handle it gracefully
2022-09-07 09:44:51 +02:00
Christian Brabandt
90c6746311
builder: correctly remember the previous group when switching alignment
When `g:airline_skip_empty_sections' is set, and a section is considered
and after that section comes the alignment separator '%=' than airline
would not correctly render the airline_prevgroup_to_airline_curgroup
simply because the '%=' marker confuses it about which is actually the
previous group.

So consider the '%=' marker to be empty as well.

The case can be observed, when having set
`g:airline_skip_empty_sections' to true and opening a help buffer.
Because in that case, airline_section_c will be considered empty, then
the alignment separator comes and after that airline will (wrongly)
generate a highlighting group `airline_c_to_airline_z`, while it should
actually generate `airline_b_to_airline_z`
2022-09-02 12:44:44 +02:00
BonaBeavis
d1f2c13e4f
Fix nvimlsp not picking up show_line_number 2022-08-23 16:38:15 +02:00
Christian Brabandt
9d20473e91
fugitiveline: remove outdated calls to fugitive
as per https://github.com/tpope/vim-fugitive/issues/2034

This also fixes an issue that is shown in older Vims (pre 7.4.1711)
since those versions did not correctly catch exceptions while evaluating
the statusline.

closes #2566
2022-08-15 17:30:53 +02:00
Christian Brabandt
61042e3502
fern: enable fern again
fern.vim decided to remove the global variable `g:fern_loaded` in
f9404e8a59b6a74b15a5

So adjust to use the correct variable name `g:loaded_fern`.

fixes #2346
2022-08-09 11:59:19 +02:00
Christian Brabandt
aee282c964
symbols: use proper Column number codepoint
Back when the colnr symbol was first introduced in
8929bc72a1 it included symbol `\ue0a3`
when powerline fonts where supposed to be used by setting
`:let g:airline_powerline_fonts=1`

However, it turns out, that those symbol, may actually not be defined in
the powerline fonts at all, only in the
[powerline-extra-symbols](https://github.com/ryanoasis/powerline-extra-symbols)
and this has caused various issues, because it either did not display at
all, or the symbol caused strange overflowing issues which made the
overall look of the status line not very appealing and already caused
various issues here in the vim-airline repository.

Therefore, fall back to the symbol `\u2105` (℅) which at least is
already defined in the Unicode specification and has therefore a higher
chance of being defined inside a powerline font at all (but it may still
be missing after all).

Also, it is more consistent, because it will now use the same symbol as
when `g:airline_powerline_fonts` is not defined and the default Unicode
symbols are selected.

So if you want to keep on using the old symbol, you need to use:
```
let g:airline_symbols.colnr="\ue0a3:"
```

fixes: #2563
related: #2381
2022-08-08 10:11:44 +02:00
Christian Brabandt
9c7790b030
Merge pull request #2556 from watagashi/follow-interface-change-in-taglist
Follow interface change of Tlist_Get_Filenames() in taglist
2022-08-08 08:55:49 +02:00
GONI Guillaume
4933ee0977
add support for line numbers for nvimlsp like ale 2022-07-29 10:37:08 +02:00
WADA Takashi
61dc750149
Follow interface change of Tlist_Get_Filenames() in taglist
fac4055600 (diff-f6bf21c80d33916483d5e6c73613457b588f0c86886ebf84f6a50f242e36d72bL3687)
2022-07-27 11:57:42 +09:00
Christian Brabandt
fd56e87d00
highlighter: always consider terminal to be non-modified
references #2506
2022-07-12 22:38:56 +02:00
Tim Pope
e4f586b76b
branch: simplify git branch logic slightly 2022-07-12 21:45:52 +02:00
Roberto Castagnola
9bc66119a4 vim9: Fix boolean check in tabline#formatters#default
fixes #2544
2022-06-27 22:34:02 +02:00
Matteo Riondato
ba50f598ee
Show flag when detect_spelllang is 'flag', do not when it is 0.
927e142e94 broke the "show the lang flag"
functionality, as the check `if g:airline_detect_spelllang` is always
false when this variable is `'flag'`. Explicitly check whether this
variable is the string `'0'` to detect whether the feature should be
disabled.
2022-06-08 08:54:44 -04:00
Christian Brabandt
5d7e656081
fugitive: remove old fugitive test
As mentioned by @tpope, remove the old test for the autoloaded function
fugitivie#head() and instead use consistently FugitiveHead() everywhere
2022-05-21 21:58:11 +02:00
Sven Berkvens-Matthijsse
396116b059
Mark the end of the close button
Not marking the end makes the rest of line (after the close button) also clickable and react as if the close button was clicked. That is very confusing and incorrect behavior.
2022-05-06 08:51:14 +02:00
Christian Brabandt
13628d698d
scrollbar: allow to customize minimum window width
closes #2531
2022-05-05 23:09:33 +02:00
Christian Brabandt
d421c35f94
Merge pull request #2529 from zoumi/master
make exclude pattern works when there are more than one tabpages
2022-05-05 23:05:30 +02:00
Christian Brabandt
0241bdb804
fugitiveline: leading zeros dropped in buffername
fixes #2533
2022-05-05 20:17:45 +02:00
zoumi
ce0e8d7e82 make exclude pattern works when there are more than one tabpages 2022-04-30 10:44:58 +08: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
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
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
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
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
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