This commit removes (direct) FZF plugins in favor of telescope.nvim,
which provides a significantly nicer, native experience in doing fuzzy
searching.
The primary out of the box method for interacting with Telescope is
through the <C-Right> super key, which opens a 'meta-menu' of searchers
that you can choose from.
Some of the more interesting options are 'find_files', 'live_grep_search',
and 'lsp_symbols'. Note that you can use fuzzy searching for these. For
example, the chord <C-Right>ff<CR> brings up the 'find_files' menu.
Users are encouraged to create their own key maps for commonly used
searchers.
Also ignore Telescope windows in pear-tree as pear-tree's <CR> bind seems
to interact poorly with Telescope usage of <CR> (i.e it blocks it completely),
so we disable it
This commit adds integration for the builtin spell checker to our auto
completion engine.
Now, unfortunately, it is not nearly as intelligent as coc-spell-checker
is, and is missing _lots_ of common words that I/we use every day.
To alleviate this a bit, there are three spell files that can be used to
add/remove/override spell words:
1. <workspace>/.vim/words.utf-8.add
2. ~/.config/nvim/words.utf-8.add
3. $PSOXIZSH/nvim/spellfile/words.utf-8.add
You may also easily add / remove words from a given file via:
- [count]<Leader>ss: Whitelist word in `count` spell file, defaulting to
the lowest write-able file
- [count]<Leader>sw: Blacklist word in `count` spell file, defaulting to
the lowest write-able file
- [count]<Leader>sus: Undo whitelist word in `count` spell file
- [count]<Leader>suw: Undo blacklist word in `count` spell file
- ]s: Next bad word
- [s: Previous bad word
This commit adds (nvim-)cmp as our completion engine / framework.
We also add completion sources for (file)paths, buffer contents, LSP
actions and snippets -- courtesy of vsnip.
This provides similar functionality to coc's completion engine, but
with (much) better support for LSP actions, lua native key maps and
significantly more configuration options that can be easily overridden
but psoxizsh users.
We add similar default key maps as with what existed in coc, namely
that <CR> exits the autocompletion window, <C-Space> does the selected
LSP action, <Tab>/<S-Tab> cycles through options and <PageUp/Down>
scrolls documentation of the current item.
We also explicitly enable completion / snippet support in client capacities
sent to LSP servers, as many require this before offering completions
Adds support for treesitter syntax / grammars when editing files.
This is currently an experimental neovim feature but is (very) likely to
be merged into the upstream in one of the next releases.
This is a plugin for reporting '$/progress' status messages from neovim.
Realistically, only (some) LSP servers actually use this, but it
provides a clean, minimal method for understanding what an LSP is
working on at the minute.
`Server.Rust`, `Server.Lua` and `Server.Json` support it at a minimum,
from my personal testing
This plugin provides project (and user) local configuration files for
LSP settings, similiar to coc-settings files.
By default, it will search
- $HOME/.config/nlsp-settings/<language-server>.json
- <project-root>/.nlsp-settings/<language-server>.json
for configuration, automatically updating the language server with the
settings found within. These override any settings set within lua...
bare this in mind.
You may access the associated files via:
:LspSettings [local] <language>|buffer
This plugin provides the tools for initializing language servers, using
the builtin neovim LSP client. It provides the major low level glue for
actually starting and configuring a given language server; however it
**does not** ensure that the actual language server is present on the
system / in PATH.
That function is handled by mason / mason-lspconfig, which will prompt
the user to install the necessary server(s) upon calling
`lspconfig[$server].setup { ... }`.
We provide a default on_attach function the sets up some default key
maps for LSP related functionality, loading a user overridable map of
language servers and their associated setup objects or functions.
Note that "setting up" a language server is not the same as loading it,
which is a considerably more expensive operation. Hence, we make no
effort to lazily setup language servers.
These were selected as they seem generally useful in everyday usage of
neovim. Vim/Lua is obvious, Json and Yaml is generally useful for
config editing.
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.
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.
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
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.
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'})
- 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
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
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.
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.
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.
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.
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.
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)
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.
This commit adds replacement to airline's bufferline. It provides a
fast, flexible bufferline with a couple big improvements over airline:
1. Fast
2. Sidebar aware (e.x for NERDTree)
3. Buffer management, including grouping (via directory), movement and go-to-buffer
4. A lot of options to customize
5. Optional icon integration
It loses the powerline look, but I'm pretty sure I can get it back if
desired in the future.
Replacing gitgutter, gitsigns appears to be the standard neovim git
integration plugin.
It is _significantly_ faster in responding to file deltas, and plays
really nicely with a lot of other tooling in the neovim ecosystem. It
also appears very customizable.
This plugin replaces the functionality of nerdtree, providing a much
smoother experience.
It also comes with a bunch new features:
- Floating window support
- Vastly more configurable
- Icon support
- Intelligent file grouping / hiding
- Faster responses to filesystem events
Minus a lot of old of the old conditional code around vim/neovim
differences.
This commit also removes some of the default plugin list. Replacements
will be added in the following commits.
- scrooloose/vim-statline
| 12 years old doesn't seem to have an effect
- vim-airline/vim-airline-themes
vim-airline/vim-airline
| Throwing all sorts of errors when loaded by packer. Not sure what is
wrong, but I think it's just incompatible.
- airblade/vim-gitgutter
| Nothing wrong with gitgutter, but it appears that a lot of the nvim
world uses (and more importantly, integrates with) gitsigns. It's also
a lot faster.
- scrooloose/nerdtree
Xuyuanp/nerdtree-git-plugin
| Again, nothing really wrong with nerdtree, but there are better
options in neovim land (neo-tree.nvim)
I couldn't find any nice, easy to use library or package for interacting
with autocmds from lua, and neovim has only in a very recent version
(0.7) added support for them through the vim.api object.
This commit adds a small module that provides an ergonomic api for
interacting with them in lua.
First import the module
local au = 'psoxizsh.autocmd'
Then you can create grouped autocmds in a variety of ways, several of
which are shown below.
```lua
-- Invoke the group, and add { events, patterns, command } triples
au.Example1 {
-- String commands are interpreted as vimscript to be executed
{ 'FileType', 'lua', 'echo "Hello from a lua file!"' }
-- Or you can provide a lua function instead
{ 'FileType', { 'yaml', 'yml' }, function() print('hello from a yaml file!') end }
}
```
```lua
-- Or pass a function that takes the group as an arg
au.Example2(function(grp)
-- And add the { patterns, command } tuple for each cmd
grp.FileType { '*.md', 'MarkdownTidy' }
grp.User { 'LSPError', 'messages' }
end)
```