Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix lua codes, consistent nerdfonts symbols, formatting #922

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ If you'd like to use an older version of the plugin compatible with nvim-0.6.1 a

```lua
-- using packer.nvim
use {'akinsho/bufferline.nvim', tag = "*", requires = 'nvim-tree/nvim-web-devicons'}
use { "akinsho/bufferline.nvim", tag = "*", requires = "nvim-tree/nvim-web-devicons" }

-- using lazy.nvim
{'akinsho/bufferline.nvim', version = "*", dependencies = 'nvim-tree/nvim-web-devicons'}
{ "akinsho/bufferline.nvim", version = "*", dependencies = "nvim-tree/nvim-web-devicons" }
```

**Vimscript**
Expand All @@ -79,15 +79,15 @@ of various highlight groups.
" In your init.lua or init.vim
set termguicolors
lua << EOF
require("bufferline").setup{}
require("bufferline").setup()
EOF
```

**Lua**

```lua
vim.opt.termguicolors = true
require("bufferline").setup{}
require("bufferline").setup()
```

You can close buffers by clicking the close icon or by _right clicking_ the tab anywhere
Expand Down Expand Up @@ -178,7 +178,6 @@ diagnostics_indicator = function(count, level, diagnostics_dict, context)
local icon = level:match("error") and " " or " "
return " " .. icon .. count
end

```

</details>
Expand All @@ -189,12 +188,10 @@ end
<summary><b>snippet</b></summary>

```lua

diagnostics_indicator = function(count, level, diagnostics_dict, context)
local s = " "
for e, n in pairs(diagnostics_dict) do
local sym = e == "error" and " "
or (e == "warning" and " " or "" )
local sym = e == "error" and " " or (e == "warning" and " " or " ")
s = s .. n .. sym
end
return s
Expand All @@ -212,10 +209,10 @@ LSP indicators can additionally be reported conditionally, based on buffer conte
```lua
diagnostics_indicator = function(count, level, diagnostics_dict, context)
if context.buffer:current() then
return ''
return ""
end

return ''
return ""
end
```

Expand Down
Loading