Commit graph

164 commits

Author SHA1 Message Date
Paul Stemmet cb591260b8 nvim/plugins: Plugins, a hookable wrapper around packer.nvim
This commit adds a wrapper api around packer.nvim, allowing callers to
provide hooks into packer's plugin initialization lifecycle.

There are 4 recognized hooks: 'early', 'pre', 'post' and 'late'.

'early' and 'pre' run before any plugins are loaded, with 'early' running
before *any* work has been done, while 'pre' runs just before calling
into packer.

'post' and 'late' are more interesting, as they are guaranteed to run
after all plugins (and their private configs) have fully loaded.
Furthermore, both hooks are provided the active Plugins object as their
first arg, allowing them access to the entire list of plugins and the
api suite of Plugins itself.

This behavior is very similar to vim-plug's plug#begin .. plug#end
fences, but improves on the pattern by:

- Properly handling bootstrap situations (our old setup would require a
 restart before everything loaded correctly)
- Async, does not block user activity while loading leading to a
 smoother experience

Special care has been taken to detect and handle bootstrap situations,
where if found, we completely defer a lot of activity (and the hooks
'post', 'late') until packer indicates that the entire install workflow
has completed.

-- Usage

The expected usage of this api set si via requiring the module, setting
up your hooks and initializing the module:

```lua
local htable = { early = early_hook, ... }
local plugs = require('psoxizsh.plugins'):setup({ hooks = htable }):init()
```

As a convenience, you may directly call the module with your hooks,
rather than writing out the above:

```
require 'psoxizsh.plugins' { hooks = ... }
```

Plugins also provides several other interesting methods:

- :reload/0     | completely reload plugin configuration, including rerunning
                  any hooks
- :list/0       | get the list of raw plugin specs that were passed to packer
- :do_hook/1    | request Plugins run @hook 'early' | 'pre' | 'post' | 'late'
- :get/1        | get the spec object for the provided plugin id
- :has/1        | check if the spec contains the provided plugin id
2022-07-24 17:25:42 +01:00
Paul Stemmet 0ff9ecdba3 nvim/plugins/bootstrap: install package manager if fresh system
This module bootstraps our plugin manager

It can (and should) be called before any plugins are initialized,
containing only a dependency on system git, for cloning the package
manager locally.

The 'install_path' variable was taken from packer.nvim's documentation
and installs packer as an optional (opt) plugin. This is important for
when we have packer manage itself, as we'll need to:

1. Ensure it's loaded during bootstrap via `packadd packer`
2. Install load hooks on it's various commands + module
2022-07-24 17:25:42 +01:00
Paul Stemmet 94facbcce9 nvim/util: add mreload/1, mconfig/2, try_* variants
These functions are primarily designed for reloading lua modules, and
specifically, lua modules returning some sort of local config object or
function.
2022-07-24 17:25:42 +01:00
Paul Stemmet 36fcf67bd6 zshrc: add experimental flag for testing lua based neovim config
This commit adds an env var, PSOXIZSH_EXPERIMENTAL_NEOVIM_LUA, that can
be set to opt into using an 'init.lua' based configuration.

This setting only makes sense to use with neovim, and thus even if we do
decide to switch to lua, we'll need to keep the old vimrc config around
for a long time yet, to ensure backwards compatibility
2022-07-24 17:25:42 +01:00
Sandeep Sen 9abd292329 Updated plugin from osx to macos
Fix for the warning
```
The `osx` plugin is deprecated and has been renamed to `macos`.
Please update your .zshrc to use the `macos` plugin instead.
```
2022-04-01 17:24:21 +01:00
psox 6914904823 Update to reflect latest changes and add some more documentation 2022-04-01 15:18:29 +01:00
André Stemmet a5156ed435
Updated to lasted comments 2022-04-01 14:49:16 +01:00
Paul Stemmet f93cdf9fc6 README: remove TLS skip, tidy code blocks 2021-12-05 11:45:38 +00:00
Paul Stemmet b2a684c579 ff all submodules 2021-11-11 19:50:07 +00:00
Paul Stemmet 2b6095933a ff submodules 2021-11-11 19:34:26 +00:00
psox 4af2ea3027 consolodate with develop 2021-11-04 15:12:41 +00:00
psox 1575eff1a4 consolodate with psox/arch 2021-11-04 15:11:37 +00:00
Paul Stemmet fb196e31c5 zshrc: refactor tmux integrations
We now require that a user's local tmux path is ~/.config/tmux.
This is due to failings in how TPM parses tmux config files, namely
that it doesn't expand variables and only looks one level deep for
source-file declarations.

By default we symlink $PSOXIZSH/tmux/tmux.conf to ~/.tmux.conf. Again,
because both TPM and tmux itself have strong (unconfigurable) opinions
about where config files live we'll just have to live with it.

On the upside, this allows us to seperate out different tmux config
'fragments' into files which a user can then include.

By default we symlink in fragment/plugins.conf, but all others are
optional.
2021-08-29 20:03:40 +01:00
Paul Stemmet a91b05a0f0 tmux/fragment: add plugins, vim-movement 2021-08-29 20:03:40 +01:00
Paul Stemmet d16b5c69ca tmux/tmux: refactor to use source files
- plugins -> $PSOXIZSH/tmux/plugins.conf
- vim integration -> $PSOXIZSH/tmux/fragment/vim-movement.conf

We also allow the user to include personal settings via ~/.config/tmux/{early,late}.conf
which can include any of the fragments we collect!

C
2021-08-29 20:03:40 +01:00
Paul Stemmet fbf825aef8 vimrc: fix coc.nvim goto bindings 2021-08-16 08:18:42 +01:00
Paul Stemmet a45652fd2e
Feature/fzf commands (#4)
* vimrc: fix signcolumn, prune quickfix,netrw buffers from list

* vimrc: add FZF shortcuts, overrides

* vimrc: improvements to coc.nvim, check for node
2021-08-08 20:22:07 +01:00
psox 05e3ef0cc1 fix problem with xhost 2021-07-08 16:42:47 +01:00
Paul Stemmet 7ae5a26fad bugfix: <leader>. now selects the current word 2021-04-26 10:44:22 +00:00
Paul Stemmet 74f10eac12
Merge pull request #3 from psox/feature/fix-coc-nvim
remove archived coc.actions, fix tab buffers
2021-04-22 16:28:48 +01:00
Paul Stemmet 818ead9770 remove archived coc.actions, fix tab buffers 2021-04-22 14:58:44 +00:00
psox a67e9cf359 remove unwanted aliases 2020-10-29 10:26:36 +00:00
Paul Stemmet 6b6ae7fb9c
Merge pull request #2 from psox/pstemmet/neomake
Add neomake
2020-10-03 17:35:12 +01:00
Paul Stemmet 1c56259ad3 fix type 2020-10-03 16:02:30 +00:00
Paul Stemmet 94354e9286 make starship happy 2020-10-03 15:50:54 +00:00
Paul Stemmet 4d1daa5552 add go autocmds 2020-10-03 15:34:22 +00:00
Paul Stemmet 1fe573ad4f fixes to qf/loc closing, add pear-tree 2020-10-03 14:48:05 +00:00
Paul Stemmet d4803b6c31 initial integration with neomake 2020-10-01 13:23:04 +00:00
André Stemmet f92bf0daa9
Update Unicode symbols to be more readable 2020-08-05 14:01:02 +01:00
André Stemmet 159227f63f
Use unicode escape characters for listchars
Make cut and pasted easier in multi-system environments
2020-08-05 12:31:25 +01:00
pSox a0beef204a Added better buffer handling to vimrc 2020-08-03 16:56:05 +01:00
pSox f78d3a1a6b not all themes have airline support 2020-07-16 14:51:43 +00:00
pSox fc26bf48f3 changed mapping for localsearch 2020-07-16 14:43:30 +00:00
pSox d8c4e31809 added support for jsonc 2020-07-16 14:20:25 +00:00
pSox 42205df549 allow color scheme overide 2020-07-16 13:40:42 +00:00
André Stemmet 57c50a8ddd
Allow for chnages in to g:coc_global_extensions 2020-07-16 10:14:58 +00:00
psox 0f65a8e0ac Merge changes from baz 2020-07-11 14:59:08 +00:00
pSox 89fc4e63ec update for new golang plugin 2020-07-03 09:50:15 +01:00
pSox 4ecbe74eba update vim support and upgrade submodules 2020-07-03 09:37:06 +01:00
pSox 8fc693c1b8 added italic support to tmux 2020-06-19 19:25:45 +01:00
pSox 4148a1853d added italic support 2020-06-15 23:46:49 +01:00
pSox 5bd0304721 added foamtting support 2020-06-15 23:28:14 +01:00
pSox f7bae5abc0 added markdown support 2020-06-15 23:26:54 +01:00
pSox a02ce774b3 make comments italic 2020-06-15 23:22:01 +01:00
psox 980f4915fc change hidden chars 2020-06-14 17:07:27 +01:00
psox 17c423f98f vimrc update pops 2020-06-14 17:04:12 +01:00
psox 9216ab447e set ignorecase for completion 2020-06-14 16:18:25 +01:00
psox 978cd9132f Update vimrc file 2020-06-14 16:11:35 +01:00
psox 55175caf55 Update vimrc file 2020-06-14 14:35:30 +01:00
psox ebb06c53a8 Modified the location of include files 2020-06-12 20:05:48 +01:00