clone of my dotfiles.ssp.sh
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

update outline to work with zen-mode as popup

sspaeti 3fdd66a5 1af94871

+29 -8
+17 -2
nvim/.config/nvim/lua/sspaeti/plugins/aerial.lua
··· 7 7 }, 8 8 config = function() 9 9 require('aerial').setup({ 10 + layout = { 11 + max_width = 30, 12 + width = 25, 13 + min_width = 20, 14 + default_direction = "right", 15 + }, 16 + float = { 17 + border = "rounded", 18 + relative = "win", 19 + override = function(conf, source_winid) 20 + conf.anchor = "NE" 21 + conf.col = vim.fn.winwidth(source_winid) 22 + conf.row = 0 23 + return conf 24 + end, 25 + }, 10 26 -- Skip treesitter for SQL to avoid create_policy query error 11 27 -- See: https://github.com/stevearc/aerial.nvim/issues/506 12 28 backends = { ··· 16 32 plsql = { "lsp" }, 17 33 }, 18 34 on_attach = function(bufnr) 19 - -- Toggle the aerial window with <leader>a 20 - vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>o', '<cmd>AerialToggle!<CR>', {}) 35 + -- <leader>o is mapped in remap.lua (zen-mode aware) 21 36 -- -- Jump forwards/backwards with '{' and '}' 22 37 -- vim.api.nvim_buf_set_keymap(bufnr, 'n', '{', '<cmd>AerialPrev<CR>', {}) 23 38 -- vim.api.nvim_buf_set_keymap(bufnr, 'n', '}', '<cmd>AerialNext<CR>', {})
+2 -2
nvim/.config/nvim/lua/sspaeti/plugins/markdown.lua
··· 64 64 let g:vimwiki_global_ext = 0 " o 65 65 ]]) 66 66 67 - -- Outline Shortcut 68 - vim.cmd("autocmd FileType markdown,vimwiki nmap <leader>o :SymbolsOutline<CR>") 67 + -- Outline Shortcut (uses AerialToggle, configured in aerial.lua) 68 + -- vim.cmd("autocmd FileType markdown,vimwiki nmap <leader>o :SymbolsOutline<CR>") 69 69 70 70 -- create WikiLink and paste clipboard as link when in visual mode 71 71 vim.cmd('autocmd FileType markdown vnoremap <leader>K <Esc>`<i[<Esc>`>la](<Esc>"*]pa)<Esc>')
+3 -3
nvim/.config/nvim/lua/sspaeti/plugins/zen-mode.lua
··· 5 5 config = function() 6 6 require("zen-mode").setup({ 7 7 on_open = function(_) 8 + vim.g.zen_mode_active = true 8 9 vim.fn.system([[tmux set status off]]) 9 10 vim.fn.system( 10 11 [[tmux list-panes -F '\#F' | grep -q Z || tmux resize-pane -Z]]) 11 12 end, 12 13 on_close = function(_) 14 + vim.g.zen_mode_active = false 13 15 vim.fn.system([[tmux set status on]]) 14 16 vim.fn.system( 15 17 [[tmux list-panes -F '\#F' | grep -q Z && tmux resize-pane -Z]]) 16 18 end, 17 19 window = { 18 - -- width = 0.66, 19 - -- backdrop = 1, 20 + width = 120, 20 21 options = { 21 22 relativenumber = false, 22 23 signcolumn = "no", 23 24 number = false, -- disable number column 24 25 }, 25 - tabline 26 26 }, 27 27 }) 28 28 end,
+7 -1
nvim/.config/nvim/lua/sspaeti/remap.lua
··· 243 243 vim.keymap.set("n", "<leader>sc", ":set nospell<cr>") 244 244 245 245 --Aerial 246 - vim.keymap.set("n", "<leader>o", ":AerialToggle<CR>", { noremap = true, silent = true }) 246 + vim.keymap.set("n", "<leader>o", function() 247 + if vim.g.zen_mode_active then 248 + vim.cmd("AerialToggle float") 249 + else 250 + vim.cmd("AerialToggle") 251 + end 252 + end, { noremap = true, silent = true }) 247 253 --preview 248 254 249 255