-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(disable): prevent blocked quit with relative windows (#354)
## 📃 Summary relative windows are considered as windows, so the disable check was false in case one is opened closes #352
- Loading branch information
Showing
4 changed files
with
77 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
vim.cmd([[let &rtp.=','.getcwd()]]) | ||
|
||
vim.cmd("set rtp+=deps/mini.nvim") | ||
vim.cmd("set rtp+=deps/nvim-web-devicons") | ||
vim.cmd("set rtp+=deps/incline") | ||
|
||
require("mini.test").setup() | ||
require("no-neck-pain").setup({ | ||
width = 1, | ||
minSideBufferWidth = 0, | ||
integrations = { NeoTree = { reopen = true } }, | ||
}) | ||
local helpers = require("incline.helpers") | ||
local devicons = require("nvim-web-devicons") | ||
require("incline").setup({ | ||
window = { | ||
padding = 0, | ||
margin = { horizontal = 0 }, | ||
}, | ||
render = function(props) | ||
local filename = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(props.buf), ":t") | ||
if filename == "" then | ||
filename = "[No Name]" | ||
end | ||
local ft_icon, ft_color = devicons.get_icon_color(filename) | ||
local modified = vim.bo[props.buf].modified | ||
return { | ||
ft_icon and { | ||
" ", | ||
ft_icon, | ||
" ", | ||
guibg = ft_color, | ||
guifg = helpers.contrast_color(ft_color), | ||
} or "", | ||
" ", | ||
{ filename, gui = modified and "bold,italic" or "bold" }, | ||
" ", | ||
guibg = "#44406e", | ||
} | ||
end, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters