Skip to content

Commit 81bbdc0

Browse files
authored
Merge branch 'master' into master
2 parents 21569af + 070cd91 commit 81bbdc0

File tree

8 files changed

+54
-16
lines changed

8 files changed

+54
-16
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
custom: ["https://buymeacoffee.com/shadmansalj"]

.github/workflows/autogen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ concurrency:
1616
jobs:
1717
autogen:
1818
name: "(vimdoc|formating)"
19-
runs-on: ubuntu-20.04
19+
runs-on: ubuntu-22.04
2020
timeout-minutes: 10
2121
permissions:
2222
contents: write

.github/workflows/ci.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ concurrency:
1111
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
1212
cancel-in-progress: true
1313

14-
1514
jobs:
1615
tests:
1716
name: ${{ matrix.os }} ${{ matrix.flavor }}
@@ -20,19 +19,19 @@ jobs:
2019
matrix:
2120
include:
2221
- flavor: nvim-0.7
23-
runner: ubuntu-20.04
22+
runner: ubuntu-22.04
2423
os: linux
2524
nvim_version: v0.7.0
2625
- flavor: nvim-0.8
27-
runner: ubuntu-20.04
26+
runner: ubuntu-22.04
2827
os: linux
2928
nvim_version: v0.8.0
3029
- flavor: nvim-0.9
31-
runner: ubuntu-20.04
30+
runner: ubuntu-22.04
3231
os: linux
3332
nvim_version: v0.9.0
3433
- flavor: nvim-nightly
35-
runner: ubuntu-20.04
34+
runner: ubuntu-22.04
3635
os: linux
3736
nvim_version: nightly
3837
runs-on: ${{ matrix.runner }}
@@ -48,13 +47,13 @@ jobs:
4847
- name: Setup neovim ${{matrix.nvim_version}}
4948
uses: rhysd/action-setup-vim@v1
5049
with:
51-
neovim: true
52-
version: ${{matrix.nvim_version}}
50+
neovim: true
51+
version: ${{matrix.nvim_version}}
5352
- name: Run tests
5453
run: |
5554
make test
5655
lint:
57-
runs-on: ubuntu-20.04
56+
runs-on: ubuntu-22.04
5857
timeout-minutes: 10
5958
steps:
6059
- uses: actions/checkout@v2

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
![code size](https://img.shields.io/github/languages/code-size/nvim-lualine/lualine.nvim?style=flat-square)
66
![license](https://img.shields.io/github/license/nvim-lualine/lualine.nvim?style=flat-square)
7+
[![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-F7941D?style=plastic&logo=buy-me-a-coffee&logoColor=white)](https://buymeacoffee.com/shadmansalj)
78

89
<!-- panvimdoc-ignore-end -->
910

@@ -1037,3 +1038,11 @@ You can find some useful [configuration snippets](https://github.com/nvim-lualin
10371038

10381039
If you want to extend lualine with plugins or want to know
10391040
which ones already do, [wiki/plugins](https://github.com/nvim-lualine/lualine.nvim/wiki/Plugins) is for you.
1041+
1042+
### Support
1043+
1044+
If you find this project useful, consider supporting development:
1045+
1046+
<a href="https://buymeacoffee.com/shadmansalj" target="_blank">
1047+
<img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me a Coffee" width="200">
1048+
</a>

doc/lualine.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,6 +1097,14 @@ If you want to extend lualine with plugins or want to know which ones already
10971097
do, wiki/plugins <https://github.com/nvim-lualine/lualine.nvim/wiki/Plugins> is
10981098
for you.
10991099

1100+
SUPPORT ~
1101+
1102+
If you find this project useful, consider supporting development:
1103+
1104+
<a href="https://buymeacoffee.com/shadmansalj" target="_blank"> <img
1105+
src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me a
1106+
Coffee" width="200"> </a>
1107+
11001108
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
11011109

11021110
vim:tw=78:ts=8:noet:ft=help:norl:

examples/bubbles.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ require('lualine').setup {
4141
lualine_a = { { 'mode', separator = { left = '' }, right_padding = 2 } },
4242
lualine_b = { 'filename', 'branch' },
4343
lualine_c = {
44-
'%=', --[[ add your center compoentnts here in place of this comment ]]
44+
'%=', --[[ add your center components here in place of this comment ]]
4545
},
4646
lualine_x = {},
4747
lualine_y = { 'filetype', 'progress' },

lua/lualine/components/filename.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ local default_options = {
2121

2222
local function is_new_file()
2323
local filename = vim.fn.expand('%')
24-
return filename ~= '' and vim.bo.buftype == '' and vim.fn.filereadable(filename) == 0
24+
return filename ~= ''
25+
and filename:match('^%a+://') == nil
26+
and vim.bo.buftype == ''
27+
and vim.fn.filereadable(filename) == 0
2528
end
2629

2730
---shortens path by turning apple/orange -> a/orange

lua/lualine/extensions/trouble.lua

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,40 @@
11
local M = {}
22

3-
local function get_trouble_mode()
4-
local opts = require('trouble.config').options
5-
6-
local words = vim.split(opts.mode, '[%W]')
3+
---Format mode, eg: lsp_document_symbols -> Lsp Document Symbols
4+
---@param mode string
5+
---@return string
6+
local function _format_mode(mode)
7+
local words = vim.split(mode, '[%W]')
78
for i, word in ipairs(words) do
89
words[i] = word:sub(1, 1):upper() .. word:sub(2)
910
end
1011

1112
return table.concat(words, ' ')
1213
end
1314

15+
local function get_trouble_mode()
16+
local opts = require('trouble.config').options
17+
if opts ~= nil and opts.mode ~= nil then
18+
return _format_mode(opts.mode)
19+
end
20+
21+
local win = vim.api.nvim_get_current_win()
22+
if vim.w[win] ~= nil then
23+
local trouble = vim.w[win].trouble
24+
if trouble ~= nil and trouble.mode ~= nil then
25+
return _format_mode(trouble.mode)
26+
end
27+
end
28+
29+
return ''
30+
end
31+
1432
M.sections = {
1533
lualine_a = {
1634
get_trouble_mode,
1735
},
1836
}
1937

20-
M.filetypes = { 'Trouble' }
38+
M.filetypes = { 'trouble', 'Trouble' }
2139

2240
return M

0 commit comments

Comments
 (0)