Commit Graph

1763 Commits

Author SHA1 Message Date
Vincenzo Di Massa
f7cbf8c429
glob return results without removing wildignore matches
Ignore 'wildignore' and 'suffixes' when globbing for themes and extensions.

This can be a problem when you have a wildignore containing *.vim.

closes #2375
2021-05-03 08:37:05 +02:00
Christian Brabandt
76c24d2126
Merge pull request #2374 from ReubenM/master
Section-Z symbols and layout
2021-05-03 08:09:38 +02:00
Trevor Stone
7a87615cbe Fire AirlineToggledOff autocmd even if airline is disabled
Fixes #2377.  This regression was introduced in 2e9df43.
2021-05-02 21:44:45 -06:00
Christian Brabandt
2e9df43962
autocommands: check for existence of airline highlight group
Several extensions trigger custom actions. Make sure, those actions are
only performed, if airline is actually active and not temporarily
disabled using e.g. :AirlineToggle
2021-04-30 13:26:33 +02:00
ReubenM
9e62ad962a Remove un-needed spaces in section-z when using Ascii variant 2021-04-29 12:09:41 -05:00
ReubenM
8929bc72a1 Fix symbols and layout used in line and column display from section-z. Added column number symbol. 2021-04-29 11:55:25 -05:00
Christian Brabandt
c9eaf4c5d2
Merge pull request #2366 from vim-airline/add_new_opthon_airline_sectionc_file
[add] airline_sectionc_filename_onlyfilename option
2021-04-27 17:46:00 +02:00
kazukazuinaina
9b2c1e9915 [add] g:airline_section_c_only_filename 2021-04-27 19:39:21 +09:00
Christian Brabandt
0a87d08dbd
whitespace: Skip '===' conflict marker for markdown
fixes: #2014
2021-04-23 08:48:44 +02:00
Christian Brabandt
07ab201a27
Merge pull request #2363 from KSR-Yasuda/feature/ScratchBufName
Set bufname for [Scratch] (buftype = nofile)
2021-04-15 10:06:29 +02:00
Christian Brabandt
70b06be4b0
highlighter: do not error out, if defined hi-color does not exist
if a color definition is being used, that Vim does not seem to
recognize, instead of erroring out fallback to a hard-coded value of
grey. Otherwise we do have potentially a bad user experience for
throwing too many error messages at the user in very short time, which
may prevent him from doing the actual work (as just happened to me)

Grey should always be defined and it should be rather easy to spot
(I hope). Also just mention for what group this happens.

This should give the user a clue, where and when this happens (so he may
be able to adjust the theme).
2021-04-14 12:36:00 +02:00
yasuda
bc5945de65 Set bufname for [Scratch] (buftype = nofile) or [No Name] (otherwise) 2021-04-14 16:54:22 +09:00
Christian Brabandt
ed60e1d369
Merge pull request #2355 from patrick96/coc_current_function
coc: Show the current function in section_x
2021-03-27 17:15:19 +01:00
Christian Brabandt
2e421d3cd6
Merge pull request #2356 from nomasprime/move-airlineaftertheme-autocmd-to-load-theme
Move AirlineAfterTheme to load_theme()
2021-03-27 17:14:20 +01:00
Kirill Kuznetsov
75383ef2e7
Fix error: key not present in dictionary "percentage"
a3b58eb7c4/doc/vim-lsp.txt (L1371)

percentage key is optional
2021-03-21 17:40:33 +03:00
Rick Jones
3d7dfa8ef6 Move AirlineAfterTheme to load_theme()
So it gets called when colorscheme changes.
2021-03-21 11:19:08 +00:00
patrick96
7d6adf9cc5
coc: Show the current function in section_x
coc.nvim exposes the name of the function the cursor is currently in
through b:coc_current_function.

For this to work, the key coc.preferences.currentFunctionSymbolAutoUpdate
must be set to 'true' in the coc config.

The value is only updated on CursorHold, so the value may not always be
accurate when moving around.
2021-03-20 00:42:46 +01:00
Christian Brabandt
09dbd09ed3
highlighter: handle color names when converting into msdos codes
the highlighter code tries to convert the RGB colors into appropriate
color codes for the MSDOS palette. Unfortunately, it does not consider
color names and tries to split those into a list of 3 RGB codes. This
failes for names shorter 6 characters, causing a list index out of
bounds error.

Fix this by making sure, that the color code should start with '#' and
in case it does not, assume it is a color name and simple return the
name in that case.

closes #2350
2021-03-09 13:53:38 +01:00
Youngjae Lee
0a7c68afb2 tagbar: add missing default search method 2021-03-02 20:27:36 +09:00
Utkarsh Verma
32d28421fe
coc: Show line number for warnings and errors. 2021-02-28 13:00:17 +05:30
kazukazuinaina
f107396118 [Refactor] Functionalization of branch extension 2021-02-14 21:22:11 +09:00
Christian Brabandt
c01977d027
Merge pull request #2326 from kdwarn/tagbar-search-method
Add searchmethod setting for tagbar extension
2021-02-05 08:19:55 +01:00
David Briscoe
ecba959f28 Write msgfmt output to /NUL
Fix NUL file created when opening a .po file.

Using -o NUL actually creates a file called NUL in the current
directory. Using /NUL doesn't create one in C:\ (the drive the file is
located on) or any visible drive.

Despite msgfmt being able to create the file NUL (which isn't supposed
to be allowed), it's difficult to delete NUL (windows explorer can't
handle it but WSL's unix rm can remove it).

Test
Open po file and see the same warnings as before, but no NUL file
created.
Using msgfmt.exe provided by git (installed via scoop).
2021-02-04 16:13:07 -08:00
Kris Warner
a6dd1c3887 Add searchmethod setting for tagbar extension
The current implementation of tagbar does not allow for setting the
search-method in the `tagbar#currenttag` function. In
https://github.com/preservim/tagbar/pull/696, tagbar implemented this,
which has three options: nearest, neartest-stl, and scoped-stl.

The reason for adding this - for me, at least - is to use the scoped-stl
option, so that the statusline will display the proper function when
there are nested functions. (Otherwise, once you go past a nested
function, tagbar#currenttag still returns the nested function rather
than the function it was nested in.)
2021-02-04 12:18:02 -05:00
Jan-Willem van der Sijp
b9905f2445 Ensure correct checking of LSP support on neovim
Check for differing neovim versions with different APIs for LSP.

Fixes #2324

Consists of two tests:

1. Before extension load, test if this is neovim and whether this neovim
   supports LSP
2. When getting diagnostic counts, test whether a language server is
   attached to the current buffer
2021-02-03 12:11:53 +01:00
Christian Brabandt
50dfca52ed
nvimlsp: correctly call the lua functions for nvimlsp
closes #2324

Note: seems like one needs to call v:lua.vim.lsp.buf_get_clients() and
even then some older neovims do not understand that. So wrap it around
an exists() call and hope this works for all neovims.
2021-02-02 12:25:16 +01:00
Christian Brabandt
bffa7a4d23
nvimlsp: do not check for :LspInstallInfo
nvimlsp removed the :LspInstallInfo command. So instead check explicitly
for neovim for enabling the nvimlsp extension.

In the extension itself check that at least one LSP is attached to the
buffer before returning warning and error messages.

closes #2323
2021-02-02 10:07:51 +01:00
David Briscoe
74f1f0d990 Return nothing when there is no lsp-progress
Fix: a literal '0' appears after filename on older versions of vim-lsp.

0c8164b1b3 added support for showing lsp
progress, but didn't always explicitly return a value. Vim uses 0 as a
return value when none are supplied, so when used with an older version
of vim-lsp that doesn't have the progress feature a 0 appeared in the
statusline.
2021-01-13 15:25:45 -08:00
Christian Brabandt
0ca9576331
Merge pull request #2313 from DunZzzz/patch-1
Support Vue.js file extension in jsformatter
2021-01-10 19:36:20 +01:00
Emilien Jégou
36f14c478a Support Vue.js file extension in jsformatter
Included `.vue` extension to jsformatter for supporting Vue.js files. Vue files follows the same path resolution as js files: https://vue-loader.vuejs.org/spec.html#src-imports

Case sensitive comparison for jsformatter
2021-01-10 13:01:41 +01:00
Jero Sutlovic
1651762e10
Modified dark.vim commandline gui colors
Update commandline gui colors to match the commandline cterm colors
2021-01-08 15:26:18 +01:00
Christian Brabandt
0eb2ed4488
Merge pull request #2315 from micchy326/impl_vim_lsp_progress
impl vim-lsp progress
2021-01-04 08:38:43 +01:00
Christian Brabandt
4d284a677c
searchcount: Add leading space
closes #2314 #2154

Add a leading space before the searchcount statistics. Note, that this
uses a non-breaking space, because it looks like Vim is stripping aways
leading space characters (see vim/vim#1431)
2021-01-02 20:25:00 +01:00
Christian Brabandt
8a60582527
init: section_y includes missing endofline and BOM 2021-01-02 19:26:44 +01:00
micchy326
dad2c03cf5 fix vint 2021-01-02 17:01:06 +09:00
micchy326
0c8164b1b3 impl vim-lsp progress 2021-01-02 16:51:16 +09:00
Bailey Ling
5601c0928e Happy new year! 2021-01-01 12:57:00 +00:00
roachsinai
505a7d75ca tabline: add command for skip to tenth tab/buffer. 2020-12-30 00:21:43 +08:00
Christian Brabandt
2cea83eb88
whitespace: skip trailing ws test for mail filetypes 2020-12-06 09:46:14 +01:00
Christian Brabandt
9ce6f96f60
highlighter: windows terminal uses $WT_SESSION 2020-12-04 09:43:01 +01:00
Christian
06117a61e1
highlighter: windows terminal is not old win_term 2020-11-27 09:49:17 +01:00
Christian Brabandt
157af8ad8b
tabline: use airline#util#strcharpart instead on relying on stpart() with char index 2020-11-26 14:00:29 +01:00
Christian Brabandt
cbf0a8e69a
tabline: use strpart() with chars if possible (fixes #2297) 2020-11-26 10:04:43 +01:00
Christian Brabandt
a168ca7a28
tabline: get rid of s:vars in default formatter 2020-11-26 10:04:43 +01:00
nbCloud91
332fff9206
coc_status should show with autochdir
coc_status should be visible even with autochdir setting on.
2020-11-21 20:47:17 +05:30
timfeirg
5eae08609e
fix deprecation warning
code is copied from https://github.com/vim-airline/vim-airline/issues/2289
originally contributed by @cmccannbrite
2020-11-14 17:01:19 +08:00
Christian Brabandt
9267cef0f8
Merge pull request #2282 from martskins/handle-lcn-not-running
Check LanguageClient-neovim's status before getting diagnostics
2020-11-09 18:35:51 +01:00
Kamil Cukrowski
f6f8666533 Fix bug in checking if gen_tags plugin is loaded 2020-11-08 11:01:26 +01:00
Martin Asquino
bd5ae9c584 Check LanguageClient-neovim's status before getting diagnostics 2020-11-07 12:59:13 +00:00
Christian Brabandt
5f2421fa39
Merge pull request #2276 from kazukazuinaina/fix_indent_bookmark_extension
[fix] bookmark extension's indentation and add abort
2020-11-06 09:11:35 +01:00
kazukazuinaina
1ed922265a [fix] short path formatter's space 2020-11-05 23:44:29 +09:00
kazukazuinaina
83804f3c6d [fix] bookmark extension's indentation and add abort 2020-11-05 23:14:13 +09:00
Christian Brabandt
d64e5f8dd7
extensions: fix E715
Make sure, that the get() function returns the correct variable type
2020-11-05 10:36:03 +01:00
Nick Friday
193460137a [add#keymap] more customization
Added more customization for keymap extension
2020-11-04 20:46:00 +03:00
Christian Brabandt
c8c0e7d9ff
Get rid of g:airline_gui_mode
This is needed for Neovim, because an external UI could be attached to
the same neovim server, so it does not make sense to define highlighting
groups with either only the cterm or the guifg attribute set.

So refactor the code slightly got get rid of this variable (and since
this variable is not needed anymore, we can also get rid of the guienter
and OptionSet autocommand).

fixes: #2261
2020-10-30 08:32:35 +01:00
Christian Brabandt
38c9f9ca3d
Merge pull request #2256 from Kamilcuk/master
Add gen_tags.vim plugin support
2020-10-29 13:41:35 +01:00
Kamil Cukrowski
42b31b966b Add gen_tags.vim plugin support
Display a "Gen. gen_tags" text in section x when gen_tags
is generating tags, similar to gutentags support.
2020-10-22 00:16:05 +02:00
Wang Ruochen
19ab70ee87
Add nroff to wordcount 2020-10-17 16:54:46 +08:00
Christian Brabandt
83bd08a97a
Merge pull request #2243 from whisperity/battery-plugin-no-overwrite
[battery.vim] Change indicator to not overwrite position section
2020-10-14 09:04:46 +02:00
kazukazuinaina
659693c250 [fix] localsearch's url and add abort in autoload function 2020-10-14 01:17:00 +09:00
Whisperity
2762f7e6e5 [battery.vim] Move indicator to non-overwriting position if window big enough 2020-10-12 17:58:47 +02:00
kazukazuinaina
0a5753813c [fix] Variable Scope in ctrlspace's extension 2020-10-10 02:08:23 +09:00
MuhammadMouradG
f117de553b
Fix buffer order in tabline with CtrlSpace plugin 2020-10-06 12:36:28 +00:00
Subhaditya Nath
3fc5ad231c
Add more customization for 'localsearch' extension
Now it can be configured to show only when localsearch is disabled. It
is useful if you mostly keep localsearch enabled and don't want to keep
seeing the extra 'LS' section, but still want to have some kind of a
visual indication about when localsearch is disabled.
2020-09-26 01:16:48 +05:30
Moschcau, Kai
d40e5f9a1d
Improve the term extension and make it consistent
This improves the term extension in a few ways.

First it fixes some vint warnings about case sensitive comparisons.

Next it makes the active and inactive variants consistent, as well as
making the line number display consistent to other buffer types. This
was one of the main reasons to do this, because the inclusion of the
Neoterm ID in a previous pull request made inactive terminal status
lines look really inconsistent compared to the active ones.

Further this now shows the Neoterm ID in both active and inactive
buffers in Airline section B. It also removes the now redundant
Neoterm IDs from the buffer name in both Neovim and Vim.

Finally the cosmetic buffer name is now used for both active and
inactive variants.
2020-09-16 09:41:18 +02:00
Andy
98683125f6 Support coc-explorer (file explorer extension) 2020-09-15 13:44:05 +02:00
Nathan Lanza
27b52acee7
Only attempt to use dirvish if b:dirvish exists
This was causing persistent errors when you run, for example,

```
ls | nvim -c 'setf dirvish'
```

as dirvish will not yet have set that local variable yet airline will
attempt to use it.
2020-09-15 12:30:27 +02:00
kazukazuinaina
2a69254d21 [add] support battery.vim 2020-09-08 01:26:24 +09:00
Paul Walker
dd5a3c91a1 vim-magit: Can't use an empty dictionary key 2020-09-03 10:51:23 +01:00
Christian Brabandt
0f5eedff74
mode: keep hi setting when switching from 'n' to 'ni'
when using `Ctrl-O` from insert mode, the highlighting currently updates
from insert mode highlighting to normal mode highlighting.
Unfortunately, changing the highlighting can be a bit expansive, so
redefining the highlighting just for one simple command does not make
too much sense.

Instead, keep the insert mode highlighting, because that's kind of like
the major mode Vim is in currently. The mode message uses '(INSERT)' to
distinguish between a "normal" INSERT mode and this temporary INSERT
mode, so it should still be visually be distinguishable.

closes #2217
2020-08-26 22:46:05 +02:00
huanhuan_zhuang
5d3cfa4045
add 'g:airline#extensions#tabline#tabtitle_formatter' option
The option can be used to specify a customized format() function to display tab title in tab mode
2020-08-25 13:42:18 +02:00
Christian Brabandt
3a55368320
searchcount: Ignore errors from searchcount() function
If the search regex causes an error, an ugly error message is thrown,
so ignore errors in that case silently.

closes #2216
2020-08-25 13:36:03 +02:00
Christian Brabandt
02c529efe4
Merge pull request #2205 from eevan78/master
Several fixes and improvements
2020-08-20 09:33:53 +02:00
eevan78
c1134da741
Fix po.vim
There is an extra '] ' in case when a display_limit is set. Also change messages == '0T' to messages ==# '0T'
2020-08-19 11:00:39 +04:00
eevan78
ad80550252
Initial Windows support for msgfmt
For now, it is tested successfully on the latest Vim 8.2 running on Windows 10.
Needs further change and testing for Neovim and older Vim versions.
2020-08-15 02:52:48 +04:00
eevan78
c78c1fb870
Make keymap extension follow the iminsert option
This small change makes keymap extension sensitive to <CTRL-^> in Insert mode.
2020-08-15 02:43:58 +04:00
eevan78
5770e8befd
Small improvements of po extension
• Fixed shortening of message. It was not showing more than one digit for fuzzy and untranslated strings.
• Fixed case when starting translation (0 translated), and accomodated for some bigger po catalogs (more than 1000 strings)
• Add support for Windows (I use it on Windows, it works fine with latest Vim. Didn't test Neovim or older Vim versions, though)
• Add one extra space character to the right of the output string
2020-08-15 02:39:25 +04:00
kazukazuinaina
0cebac6bb0 [adjust] vista's extension width 2020-08-15 00:17:01 +09:00
Christian Brabandt
6a1c2a74e9
Merge pull request #2125 from shaine/master
Use disabled style for inactive tabs
2020-08-12 15:43:05 +02:00
Christian Brabandt
a294f0cb7e
Merge pull request #2183 from tooSadman/nvim-lsp-support
Added support for built-in nvim-lsp
2020-08-12 15:41:47 +02:00
Christian Brabandt
8037c373d0
Merge pull request #2195 from kazukazuinaina/add_wordcount_formatter_readingtime
[add] wordcount's reading time formatter
2020-08-12 15:40:26 +02:00
Christian Brabandt
21e47ca5b3
Disable whitespace checking for csv files
In addition, add a time limit of 500 ms for detecting the indent

fixes: #2200
2020-08-12 15:38:26 +02:00
kazukazuinaina
f26a01cd02 [add] wordcount's reading time formatter 2020-08-07 00:05:38 +09:00
tooSadman
782774c0dc Added support for built-in nvim-lsp 2020-08-03 18:19:26 +03:00
Christian Brabandt
ffa44b8327
Merge pull request #2188 from kazukazuinaina/fix_searchcount_extension
[fixup] Release the search restriction and remove unnecessary functions
2020-08-03 15:20:49 +02:00
Christian Brabandt
e4077b1725
Merge pull request #2185 from dcousens/patch-1
Fix spelling typo in comment
2020-08-03 14:44:58 +02:00
Christian Brabandt
a836e09e91
Merge pull request #2187 from kazukazuinaina/add_section_c_short_path
[add] short_path formatter in section_c
2020-08-03 12:21:44 +02:00
kazukazuinaina
1ca2428f51 [fixup] Release the search restriction and remove unnecessary functions 2020-07-28 16:29:42 +09:00
kazukazuinaina
b322ee6728 [add] short_path formatter in section_c
[update] test
2020-07-23 15:58:21 +09:00
kazukazuinaina
19fdf61efe [fix] CI's error 2020-07-21 14:41:15 +09:00
kazukazuinaina
13a92b1474 [fix] searchcount's extension 2020-07-21 14:08:21 +09:00
Daniel Cousens
7bb3ec24ba
Fix spelling typo in comment 2020-07-20 21:41:59 +10:00
Carlo Delle Donne
72a19ed9ed Add support for cdelledonne/vim-cmake 2020-07-17 15:14:40 +02:00
Christian Brabandt
b6d6485a90
Merge pull request #2176 from konafx/master
Add fern.vim support
2020-07-14 16:10:21 +02:00
konafx
a7716dec4d
Add extension for fern.vim 2020-07-14 22:54:55 +09:00
Christian Brabandt
f655add4e9
hunks: do not add trailing whitespace when branch extension is disabled
fixes #2177
2020-07-14 14:03:17 +02:00
skeept
c4ee72f2d9
don't rely on NR for checking that NrrRgn is loaded
This fixes issue when using Plug to conditionally loading NrrRgn:

Plug 'chrisbra/NrrwRgn', {'on': ['NR', 'NW', 'NRV', 'NW', 'NarrowRegion']}

The command will exist but the plugin has not been loaded yet which gives a warning message.
2020-07-09 11:16:23 -05:00
Christian Brabandt
768bd0f5c6
Merge pull request #2158 from larrybradley/fix-venv
Fix handling of virtualenv and poetv plugins
2020-07-09 08:42:32 +02:00
Rick Jones
46c35b80a1 Make appending airline_right_alt_sep conditional on it not being empty (wordcount)
Was appending a redundant space when airline_right_alt_sep was empty.
2020-07-08 23:46:00 +01:00
Rick Jones
ee4afdeedb Dynamically resize section Z
Resolves: #2168
2020-07-08 23:46:00 +01:00