Commit Graph

222 Commits

Author SHA1 Message Date
Paul Stemmet af4b4fa24d
nvim/lsp/preset: add presets for many languages
See below for the list of presets:

- Json
- Yaml
- Vim
- Lua
- Rust
- Go
- Awk
- Bash
- C
- CXX
- CMake
- CSS
- DockerFile
- Elixir
- GraphQL
- HTML
- JavaScript
- Jsonnet
- Markdown
- Perl
- PHP
- Python
- Ruby
- SQL
- Toml
- Terraform
- TypeScript
- TailwindCSS
- XML
2022-10-05 18:33:39 +00:00
Paul Stemmet 7ff228ae64
nvim/lsp/util: add Servers, Server, Filter
These objects provide a nice abstraction over the underlying
complexities of configuring language servers in native Neovim.

The idea is to allow users of the module to define Server/s that can
just be included somewhere and have them activate with fuss.

That said, we *do* want ways of configuring the underlying systems, and
this module provides two, one for direct consumers of this module
(Spec.setup), and one for users *of predefined Servers*, in the form of
Server.with/1.
2022-10-05 18:33:39 +00:00
Paul Stemmet 2fca27a5ab
merge: develop <--- feature/keymap
* HEAD
| \
| * 1f65b77 <github@luxolus.com> nvim: remove vimpeccable (plug/vimp)
| * cfbd1ad <github@luxolus.com> nvim/key/init: forward to key/map for now
| * 42feb20 <github@luxolus.com> nvim/key: add central location for all custom key binds
| * d557737 <github@luxolus.com> nvim/key: add Bind, BindGroup apis
| /
| develop

Signed-off-by: Bazaah <github@luxolus.com>
2022-10-05 18:32:17 +00:00
Paul Stemmet 1f65b77c0a
nvim: remove vimpeccable (plug/vimp)
This commit removes all vimpeccable (vimp) usage from the code base, as
it has been superseded by 'psoxizsh.key'.

In addition to simplifying the code, this also removes the annoying
spurious errors that would be generated when reloading configuration.

One thing to note: this commit also remove most of the LSP config we
have for coc.nvim. This is intentional, and will be corrected via a
future patchset utilizing the native neovim LSP client, as coc has
become annoying to maintain.
2022-10-05 17:49:19 +00:00
Paul Stemmet cfbd1adfc9
nvim/key/init: forward to key/map for now
This will likely change in the future, don't rely too hard on this behavior for
now
2022-10-05 17:49:19 +00:00
Paul Stemmet 42feb20e8b
nvim/key: add central location for all custom key binds
This commit adds a file that users can use to lookup available key binds
that are set.

The big benefit here is largely discoverability, as psoxizsh users no
longer are required to search thorough the entire code base looking for
binds.

That said, we *only* cover those explicitly set by psoxizsh, but
covering any created by plugins that may be used.

Still, this is a significant improvement compared to the previous
situation, and more importantly; prevents the situation from getting
worse as we add more plugins.

NOTE: Must go through prior work (util/keymap, vimp) and codebase, to properly
      search and replace all instances of key binding
2022-10-05 17:49:19 +00:00
Paul Stemmet d55773757b
nvim/key: add Bind, BindGroup apis
This commit adds wrapper objects around vim.keymap functionality.

Bind represents a single key bind, which can be register/2'ed with
Neovim. By default, Bind enables noremap and silent (:h map-arguments)
by default, as this is almost always what a user wants.

BindGroup(s) are DAG collections of child BindGroup(s) inner nodes
and Bind leaf nodes. Options are passed down the tree, though they
may be overridden by child objects.

Together they allow callers to create composable, lazy key bind
groupings, that can be instantiated together, while deferring the
implementation and activation of such groups.

Generally speaking, the big idea is to provide several well known
group 'aliases', for example, bind.Global, bind.User or bind.Lsp,
and let users override key binds in these groups, while the actual
functionality is provider (Bind.action) is opaque to them.
2022-10-05 17:49:19 +00:00
Paul Stemmet f0fa1c67fd
merge: develop <--- feature/ui-improvements
* HEAD
| \
| * 96ffa3e <github@luxolus.com> nvim/plug: +notify@v3
| * 861bbdf <github@luxolus.com> nvim/plug: -vim-one, +onedarkpro.nvim@master
| * 436d1d1 <github@luxolus.com> nvim/plug: bufferline.branch=v2.*
| /
| develop

Signed-off-by: Bazaah <github@luxolus.com>
2022-10-05 17:46:24 +00:00
Paul Stemmet 96ffa3e660
nvim/plug: +notify@v3
This is a much prettier frontend for the vim.notify API, which is used
by a lot of plugins to communicate information and/or errors.

Try it out yourself:
  :lua vim.notify('Hello, world!', 'info', { title = 'Testing Notify'})
2022-10-05 16:16:38 +00:00
Paul Stemmet 861bbdfb1d
nvim/plug: -vim-one, +onedarkpro.nvim@master
Better color scheme implementation of one
2022-10-05 16:16:37 +00:00
Paul Stemmet 436d1d17d3
nvim/plug: bufferline.branch=v2.*
As we're already using nvim >0.7.0 functionality
2022-10-05 16:16:37 +00:00
Paul Stemmet 6c8a018ae7
merge: develop <--- feature/misc-fixes-20221002
* HEAD
| \
| * ebf3308 <github@luxolus.com> nvim: linting, formatting
| * cb9e6a5 <github@luxolus.com> nvim/plug/neotree: remove spurious diagnostic sign config
| * 76a113c <github@luxolus.com> nvim/plug/lualine: slight fixes to settings
| * 184a8b6 <github@luxolus.com> nvim/util/highlight: for :highlight in lua
| * fb81d8b <github@luxolus.com> nvim/util: reorganize to allow for multiple submodules
| * a4410d6 <github@luxolus.com> nvim/autocmd: remove polyfill for <0.7 versions
| * ee4fac3 <github@luxolus.com> nvim/init.early: move &background, &termguicolors into early
| * d6827a4 <github@luxolus.com> nvim/init.post: set colorscheme to g.my_color_scheme
| * c815f5a <github@luxolus.com> tmux: fix truecolor in tmux
| * 138e66f <github@luxolus.com> zshrc: remove plugins.cargo
| /
| develop

Signed-off-by: Bazaah <github@luxolus.com>
2022-10-02 19:30:18 +00:00
Paul Stemmet ebf3308fc2
nvim: linting, formatting 2022-10-02 18:59:19 +00:00
Paul Stemmet cb9e6a55e5
nvim/plug/neotree: remove spurious diagnostic sign config
This shouldn't be being set by a plugin, particularly one that has
nothing to do with diagnostics
2022-10-02 18:59:19 +00:00
Paul Stemmet 76a113c215
nvim/plug/lualine: slight fixes to settings
- Enable toggleterm support (it now recognizes TT windows)
- Use gitsigns for branch detection (faster than running external
  git commands)
- Remove 'italic' from branch section highlights
2022-10-02 18:59:19 +00:00
Paul Stemmet 184a8b6724
nvim/util/highlight: for :highlight in lua
Provides a nicer API around doing highlighting in neovim / lua
2022-10-02 18:59:19 +00:00
Paul Stemmet fb81d8b2b9
nvim/util: reorganize to allow for multiple submodules
This change moves the original module loading utilities to
util/mload.lua, while providing a shim object that lazily attempts to
locate a function that matches the name of the indexed object.

This changes allows me to better organize utility functions
2022-10-02 18:59:19 +00:00
Paul Stemmet a4410d681f
nvim/autocmd: remove polyfill for <0.7 versions
This needlessly complicates the code, and is no longer needed, as nvim
0.7 is fairly common now.
2022-10-02 18:59:19 +00:00
Paul Stemmet ee4fac3834
nvim/init.early: move &background, &termguicolors into early
As many plugins use these when setting colors and highlights, leading to
poor coloring now that truecolor support is fixed in tmux
2022-10-02 18:59:18 +00:00
Paul Stemmet d6827a4fe5
nvim/init.post: set colorscheme to g.my_color_scheme 2022-10-02 18:59:18 +00:00
Paul Stemmet c815f5aa25
tmux: fix truecolor in tmux
So story time, I discovered :checkhealth in Neovim, and it gave a fairly
decent explanation of how to fix terminal truecolor support.

Namely, use `tmux-256color` (or `screen-256color`) for the
default-terminal, then force truecolor (Tc) in the terminal-overrides

It also mentioned that `focus-events` needs to be enabled for n/vim to
detect changes to its buffers. Notably, this allows vim to rerender
changed content when switching into a tmux pane containing a vim
session.
2022-10-02 18:59:17 +00:00
Paul Stemmet 138e66f245
zshrc: remove plugins.cargo
as the upstream has merged its functionality into plugins.rust, which is
already set.

See ohmyzsh/ohmyzsh#10270 , ohmyzsh/ohmyzsh@89a740b
2022-10-02 18:59:17 +00:00
psox cf932c2051 tmux: add ctrl-shift movement fragment file 2022-09-29 16:41:46 +01:00
psox fdba97e517
update formatting 2022-09-24 06:31:32 +00:00
psox 9c82dc25b4
recursive update 2022-09-24 06:29:05 +00:00
psox 1715cac996
fix grep error 2022-09-24 06:21:49 +00:00
Paul Stemmet 47e1dc2dd6
merge: develop <--- fix/coc-confirm-on-enter
* HEAD
| \
| * 1222c11 <github@luxolus.com> nvim/plug/coc: use <C-Space> instead of <CR> for pum inserts
| /
| develop

Signed-off-by: Bazaah <github@luxolus.com>
2022-08-30 13:40:34 +00:00
Paul Stemmet 1222c115c9
nvim/plug/coc: use <C-Space> instead of <CR> for pum inserts
Unfortunately pear-tree seems to conflict with coc in utilizing <CR>
(enter). Also the previous function assigned to <C-Space> wasn't very
useful (triggering autocompletion menu) as <TAB> already handles that.
2022-08-30 13:37:01 +00:00
Paul Stemmet 632e40a40d
merge: develop <--- fix/coc-config
* HEAD
| \
| * 03f670a <github@luxolus.com> nvim/plug/coc: disable loading when NodeJS is missing
| * 24aa253 <github@luxolus.com> nvim/plug/coc: fix K, <CR> keymaps
| /
| develop

Signed-off-by: Bazaah <github@luxolus.com>
2022-08-26 20:31:03 +00:00
Paul Stemmet 03f670a9f4
nvim/plug/coc: disable loading when NodeJS is missing
Rather than just disabling configuration, we instead simply disable the
entire plugin before it loads.
2022-08-26 20:01:31 +00:00
Paul Stemmet 24aa253790
nvim/plug/coc: fix K, <CR> keymaps
The help (K) keymap was referencing a helper object that was spuriously
left in during the development of e5909ca. This fixes that mistake, and
should remove the 'global object coc is undefined' errors that occurred
in pressing the keybind.

This commit also fixes a 1 character mistake in the pum selection logic
for confirming selection. It should now just autocomplete every item as
they are <TAB>'d through.
2022-08-26 19:51:09 +00:00
Paul Stemmet 917b5739e1
merge: develop <--- fix/vimrc-suppress-coc-warning
* HEAD
| \
| * 01e7d83 <github@luxolus.com> vimrc: coc_disable_startup_warning = 1
| /
| develop

Signed-off-by: Bazaah <github@luxolus.com>
2022-08-18 14:54:22 +00:00
Paul Stemmet 01e7d8349d
vimrc: coc_disable_startup_warning = 1
On Vim v8.2.0750 and older, coc.nvim adds a super annoying, unskippable
start up message.

This fixes that.
2022-08-18 14:51:05 +00:00
Paul Stemmet cd06580e00
merge: develop <--- fix/vimrc-coc-v0080
* HEAD
| \
| * f84cf7e <github@luxolus.com> vimrc: fix coc.nvim bindings for >= v0.0.80
| /
| develop

Signed-off-by: Bazaah <github@luxolus.com>
2022-08-17 15:35:22 +00:00
Paul Stemmet f84cf7e4b3
vimrc: fix coc.nvim bindings for >= v0.0.80
coc.nvim introduced a metric ton of backwards incompatible changes to
various APIs they expose in Vim.

This commit updates the bits we use to use the new way of doing things.

It also adds a :Format command that can be used to format the current
buffer.

You'll need to do a :PlugUpdate if your psoxizsh has an old coc locally,
you can check your version with :CocInfo, if the `version` is <= v0.0.79
2022-08-17 15:31:17 +00:00
Paul Stemmet 654fa3670a
merge: develop <--- fix/ssh-agent-forwarding
* HEAD
| \
| * ca9d31b <github@luxolus.com> zshrc: fix zstyle ssh-agent forward option
| /
| develop

Signed-off-by: Bazaah <github@luxolus.com>
2022-08-17 15:10:25 +00:00
Paul Stemmet ca9d31b178
zshrc: fix zstyle ssh-agent forward option
It appears that during rearranging yonks ago we accidentally sourced
oh-my-zsh before we set this setting, leading to the ssh-agent _always_
creating a new agent, even when SSH_AUTH_SOCK had already been set.

This a fairly minor problem, but it does leave to session lingering, and
breaks programs that manage ssh-agent identities, like gnome-keyring, or
systemd user session ssh-agent services.
2022-08-17 15:04:41 +00:00
Paul Stemmet 78d01decfb
merge: develop <--- fix/bufferline-config-override
* HEAD
| \
| * 9f49d1a <github@luxolus.com> nvim/config/bufferline: allow overriding entire setup/1 object
| /
| develop

Signed-off-by: Bazaah <github@luxolus.com>
2022-08-11 18:35:19 +00:00
Paul Stemmet 9f49d1a2f8
nvim/config/bufferline: allow overriding entire setup/1 object
this allows users to add a custom 'highlights' object to the top level
object passed to bufferline's setup/1 method, rather than only allowing
them to override the 'options' sub-object. See h: bufferline-highlights
for more on how to configure this.
2022-08-11 18:34:28 +00:00
Paul Stemmet 3d8efb49ab
merge: develop <--- fix/update-coc-config
* HEAD
| \
| * e5909ca <github@luxolus.com> nvim/plug/coc: fix breaking changes from neoclide/coc.nvim@0.80+
| /
| develop

Signed-off-by: Bazaah <github@luxolus.com>
2022-08-03 19:27:30 +00:00
Paul Stemmet e5909caf6f
nvim/plug/coc: fix breaking changes from neoclide/coc.nvim@0.80+
Basically, a whole bunch of crap was changed in 0.80, and this fixes our
config to use the new way of doing things.

*important* to retain the old way of <TAB> _not auto selecting the first
element_ in a completion window you must set '"suggest.noselect": true'
in your CocConfig! This was previously true by default, but now is false
by default.
2022-08-03 19:22:29 +00:00
Paul Stemmet da1f6a8529
merge: develop <--- fix/nvim-late-config
* HEAD
| \
| * fde2348 <github@luxolus.com> nvim/plug: promote nvim-lua/plenary.nvim@master
| * 715d71e <github@luxolus.com> nvim/plugins: wait for plugins to load before running user config
| /
| develop

Signed-off-by: Bazaah <github@luxolus.com>
2022-08-03 16:48:27 +00:00
Paul Stemmet fde23482d9
nvim/plug: promote nvim-lua/plenary.nvim@master
Its been required by other plugins, but we now introduce it as a direct
dependency due to the usage in psoxizsh.plugins
2022-08-03 15:26:19 +00:00
Paul Stemmet 715d71e537
nvim/plugins: wait for plugins to load before running user config
This commit properly defers running of 'post' and 'late' user callbacks,
by spawning a coroutine that waits until '_G.packer_plugins' exists.

This only happens after packer's compiled config is executed, thereby
correctly delaying the callbacks.

Unfortunately, there's no easy way to do async in lua, so we _do_ take
on a dependency to plenary.nvim, however this shouldn't affect bootstrap
runs, as there we were already waiting for the 'PackerCompileDone'
autocmd, which is only emitted after the compiled config is sourced.
2022-08-03 15:13:07 +00:00
Paul Stemmet 2c8ed58cfe init.lua: entry point for neovim lua config
Adds psoxizsh/nvim to the runtimepath, and runs the main init script
2022-07-24 17:25:42 +01:00
Paul Stemmet 574f7641cc psoxizsh/init: use global statusline where possible
This is relatively recent feature, only available in neovim 0.7 or
higher
2022-07-24 17:25:42 +01:00
Paul Stemmet e00c378ac3 psoxizsh/init: port static configuration from vimrc
Using the hooks provided by psoxizsh.plugins, we recreate our
vimrc configuration, minus a lot of the vim<->nvim compat logic.

A lot of the remaining configuration has also been split out into
plugin specific modules that are managed directly by packer (and thus
loaded on demand without conditionals on our part)
2022-07-24 17:25:42 +01:00
Paul Stemmet 2a309d6e4f nvim/plug: port coc.nvim + config 2022-07-24 17:25:42 +01:00
Paul Stemmet 61d3ef5b6c nvim/plug: port vim-tmux-navigator + config 2022-07-24 17:25:42 +01:00
Paul Stemmet 8d0bc13e7e nvim/plug: nvim-lualine/lualine.nvim@master
Replacing airline, lualine seems to be a super customizable
statusline plugin.

I yoinked the base config file from the net and modified it to suit my
needs.
2022-07-24 17:25:42 +01:00