Merge branch 'main' into preview_window_size_settings
This commit is contained in:
31
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
31
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Something isn't working
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
<!--
|
||||
Include steps to reproduce, what you expect to happen, and the actual result with screenshots if you could.
|
||||
|
||||
If this issue is related to a particular filetype or provider (such as symbols not showing for a particular language or file), please include the output of `:OutlineStatus` on that particular buffer.
|
||||
-->
|
||||
|
||||
|
||||
## Neovim setup
|
||||
|
||||
- Neovim version: <!--[e.g. 0.9.4] (note that outline.nvim requires 0.7+)-->
|
||||
- Outline.nvim version: <!--[e.g. v1.0.0, or a commit hash]-->
|
||||
- Neovim distro (if applicable): <!--[e.g. LazyVim]-->
|
||||
- Plugin manager: <!--[e.g. Lazy.nvim]-->
|
||||
|
||||
<!--Please include your relevant config for outline.nvim below, if any-->
|
||||
|
||||
Config:
|
||||
```
|
||||
|
||||
```
|
||||
19
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
19
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
|
||||
<!--
|
||||
Please include whether you're interested in implementing this feature yourself.
|
||||
|
||||
In many cases, a feature doesn't land solely because there isn't enough interest or motivation for someone to implement it.
|
||||
|
||||
Thanks for proposing ways to improve outline.nvim!
|
||||
-->
|
||||
@@ -1,4 +1,4 @@
|
||||
*outline.txt* For NVIM v0.7.0 Last change: 2024 July 05
|
||||
*outline.txt* For NVIM v0.7.0 Last change: 2024 August 13
|
||||
|
||||
==============================================================================
|
||||
Table of Contents *outline-table-of-contents*
|
||||
|
||||
@@ -3,6 +3,7 @@ local cfg = require('outline.config')
|
||||
local highlight = require('outline.highlight')
|
||||
local providers = require('outline.providers.init')
|
||||
local utils = require('outline.utils.init')
|
||||
local symbols = require('outline.symbols')
|
||||
|
||||
local M = {
|
||||
---@type outline.Sidebar[]
|
||||
@@ -354,6 +355,7 @@ function M.setup(opts)
|
||||
|
||||
cfg.setup(opts)
|
||||
highlight.setup()
|
||||
symbols.setup()
|
||||
|
||||
setup_global_autocmd()
|
||||
setup_commands()
|
||||
|
||||
@@ -45,6 +45,11 @@ for k, v in pairs(M.kinds) do
|
||||
M.str_to_kind[v] = k
|
||||
end
|
||||
|
||||
-- use a stub if lspkind is missing or not configured
|
||||
local lspkind = {
|
||||
symbolic = function(kind, opts) return '' end
|
||||
}
|
||||
|
||||
---@param kind string|integer
|
||||
---@param bufnr integer
|
||||
---@return string icon
|
||||
@@ -65,22 +70,26 @@ function M.icon_from_kind(kind, bufnr)
|
||||
end
|
||||
end
|
||||
|
||||
if cfg.o.symbols.icon_source == 'lspkind' then
|
||||
local has_lspkind, lspkind = pcall(require, 'lspkind')
|
||||
if not has_lspkind then
|
||||
vim.notify(
|
||||
'[outline]: icon_source set to lspkind but failed to require lspkind!',
|
||||
vim.log.levels.ERROR
|
||||
)
|
||||
else
|
||||
local icon = lspkind.symbolic(kindstr, { with_text = false })
|
||||
if icon and icon ~= '' then
|
||||
return icon
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return cfg.o.symbols.icons[kindstr].icon
|
||||
end
|
||||
|
||||
function M.setup()
|
||||
if cfg.o.symbols.icon_source == 'lspkind' then
|
||||
local has_lspkind, _lspkind = pcall(require, 'lspkind')
|
||||
if has_lspkind then
|
||||
lspkind = _lspkind
|
||||
else
|
||||
vim.notify(
|
||||
'[outline]: icon_source set to lspkind but failed to require lspkind!',
|
||||
vim.log.levels.ERROR
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user