-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
de976dc
commit bfe6875
Showing
2 changed files
with
71 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Extras | ||
|
||
## Reproducer | ||
|
||
Download the [reproducer](https://raw.githubusercontent.com/nvim-focus/focus.nvim/master/extras/repro.lua) and start it with: | ||
|
||
nvim -u repro.lua | ||
|
||
Once done zip the `repro.lua` and `.repro` directory and upload it. |
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,62 @@ | ||
-- DO NOT change the paths | ||
local root = vim.fn.fnamemodify('./.repro', ':p') | ||
|
||
-- set stdpaths to use .repro | ||
for _, name in ipairs({ 'config', 'data', 'state', 'cache' }) do | ||
vim.env[('XDG_%s_HOME'):format(name:upper())] = root .. '/' .. name | ||
end | ||
|
||
-- bootstrap lazy | ||
local lazypath = root .. '/plugins/lazy.nvim' | ||
if not vim.loop.fs_stat(lazypath) then | ||
vim.fn.system({ | ||
'git', | ||
'clone', | ||
'--filter=blob:none', | ||
'https://github.com/folke/lazy.nvim', | ||
lazypath, | ||
}) | ||
end | ||
vim.opt.runtimepath:prepend(lazypath) | ||
|
||
-- install plugins | ||
local plugins = { | ||
'nvim-focus/focus.nvim', | ||
-- add any other plugins here | ||
} | ||
require('lazy').setup(plugins, { | ||
root = root .. '/plugins', | ||
}) | ||
|
||
require("focus").setup({ | ||
enable = true, -- Enable module | ||
commands = true, -- Create Focus commands | ||
autoresize = { | ||
enable = true, -- Enable or disable auto-resizing of splits | ||
width = 0, -- Force width for the focused window | ||
height = 0, -- Force height for the focused window | ||
minwidth = 0, -- Force minimum width for the unfocused window | ||
minheight = 0, -- Force minimum height for the unfocused window | ||
height_quickfix = 10, -- Set the height of quickfix panel | ||
}, | ||
split = { | ||
bufnew = false, -- Create blank buffer for new split windows | ||
tmux = false, -- Create tmux splits instead of neovim splits | ||
}, | ||
ui = { | ||
number = false, -- Display line numbers in the focussed window only | ||
relativenumber = false, -- Display relative line numbers in the focussed window only | ||
hybridnumber = false, -- Display hybrid line numbers in the focussed window only | ||
absolutenumber_unfocussed = false, -- Preserve absolute numbers in the unfocussed windows | ||
|
||
cursorline = true, -- Display a cursorline in the focussed window only | ||
cursorcolumn = false, -- Display cursorcolumn in the focussed window only | ||
colorcolumn = { | ||
enable = false, -- Display colorcolumn in the foccused window only | ||
list = '+1', -- Set the comma-saperated list for the colorcolumn | ||
}, | ||
signcolumn = true, -- Display signcolumn in the focussed window only | ||
winhighlight = false, -- Auto highlighting for focussed/unfocussed windows | ||
} | ||
}) | ||
-- add anything else here |