These are my personal configs, scripts et al. Feel free to prod around and snag anything you happen to find interesting.
This README will at some point contain more information.
Just my dotfiles and other various configs. Nothing to see here.
Being able to jump to require
'd files would be really nice. Be aware of package.(c)path
and runtimepath
.
For example, these cases should work:
zeroknight.config.highlight
-> lua/zeroknight/config/highlight.lua
zeroknight.config
-> lua/zeroknight/config.lua
zeroknight.config
-> lua/zeroknight/config/init.lua
Allow certain parameters of Awesome (eg. background, net traffic, etc) to be configurable on a machine basis (ie. config outside of rc.lua).
Finish ditching powerline's unacceptably slow, resource gobbling, process spamming ass and create my own tmux status-line. Ideally, match the prompt we make in #5.
Ideally, some helper functions that take either a hexadecimal parameter, or RGB parameters, e.g. $(fg #00FF00)
, $(fg 255 255 100)
, etc.
When symlinking directories, avoid unnecessarily symlinking entire root dotdirs into the dotfiles repo and thus needing to ignore unwanted contents. Instead, symlink only the deepest level directories (ie. no further children), creating parent dirs in $HOME as needed. The idea is to only symlink the absolute required parent directory holding the files desired in the repo. This approach is not only easier to maintain, but more elegant and correct.
dotfiles/.config:
awesome/ openbox/ sakura/ tint2/
Instead of symlinking dotfiles/.config to ~/.config and creating a mess, symlink each leaf directory, creating the structure to mirror if necessary:
~:
.config -> dotfiles/.config # BAD
~/.config:
awesome -> ../dotfiles/.config/awesome # GOOD
...
I adore vim-plug, but having since finally started making the conversion to Neovim nightly and all the lua-goodness, packer.nvim also looks to be a very tempting option.
one
themesetup
call of sortsLeap seems to be the bleeding edge in the "better movement" paradigm, building off the collective experience and learned-lessons from plugins like EasyMotion, Sneak, Lightspeed, etc. Its design is approached with a very clear philosophy and design goal with a lot of consideration for how its jump points are chosen. If I'm going to pick up a plugin of this class, this should probably be the one.
It also has a companion plugin for f/F/t/T movements: flit.
Simply opens a file finder on ~/.cache/nvim
so I can reference Neovim logs, e.g. lsp.log
or null-ls.log
.
Create a generic programming.snippets
file with extremely basic and common snippets with negative priority to allow being overwritten. Some examples:
This error is printed when starting a shell. Could it be due to #9? May need to wrap the command in this keybind in a zle widget.
I'd like to always have the latest kitty features, so the usual suspects will generally have far too old of a kitty
version to be acceptable. Thankfully, Kovid provides convenient bundles and an installer for grabbing the latest
release. Instead of installing from repositories on non-rolling distros, install from these instead.
Add a task in the nvim
ansible role to download the PowerShell VSCode snippets from
upstream and store them
in ~NVIMD/external_snippets/vscode/PowerShell.json
Apparently UltiSnips is rather flexible in how it looks for snippets:
Using a strategy similar to how Vim detects |ftplugins|, UltiSnips iterates
over the snippet definition directories looking for files with names of the
following patterns: ft.snippets, ft_*.snippets, or ft/*, where "ft" is the
'filetype' of the current document and "*" is a shell-like wildcard matching
any string including the empty string. The following table shows some typical
snippet filenames and their associated filetype.
snippet filename filetype
ruby.snippets ruby
perl.snippets perl
c.snippets c
c_my.snippets c
c/a c
c/b.snippets c
all.snippets *all
all/a.snippets *all
It would be a good idea to follow the <ft>/<specfics>.snippets
format, especially for sets like Perl where I've made several categories of snippets. For example, I could expand them as such:
UltiSnips
` Perl
` base.snippets
` moose.snippets
` idioms.snippets
Since null-ls was sadly—but understandably archived, I should find a replacement since it's likely a matter of time before it stops working. After doing a bit of searching, I could go with one of the following:
none-ls would be a drop-in replacement, but I'm not sure if I want to commit to using it without seeing more widespread adoption. Currently, there's only been a handful of commits by a couple of maintainers, which have really only been new builtins.
Both efmls and dls are fine alternatives and both support defining linters/formatters that run in any filetype. However, a bit of a workaround is necessary to actually have them attach to "any" filetype due to the way Neovim works. More specific to my needs, however, is that neither of them support conditionally running formatters, so I wouldn't be able to exclude e.g. diff
from having whitespace trimmed. I'd realistically need to do that with an autocmd, but then I'd have to cook up a way to run it and LSP formatting and then it's no longer all done in a single place.
So that leaves nvim-lint and either formatter.nvim or conform.nvim. I used nvim-lint in the past and it does a good enough job; no issues with using it, especially now that there's an nvim API for diagnostics. Thankfully, both support conditionally running formatters:
condition
field that takes a predicate functionAs I collected these thoughts and wrote this all out, I pretty much decided on conform as I got to this point. formatter.nvim would be a perfectly acceptable choice, but conform has a killer feature of forcing range format support and calculating the actual formatting patch even for lazy LSPs that just send the whole buffer. Additionally, conform provides a lua interface instead of just user commands, which I appreciate. Conform looks awesome.
Ditch the slow frameworks loaded with extras that I don't need and/or conflict with my own stuff. Create a "framework" of my own tailor-made to my existing configuration (while lovingly yanking bits and pieces that I like from the frameworks I'm ditching).
git
As the Neovim API evolves and more Vim-only commands gain Lua equivalents, migrate Vim files to Lua.
:command
:autocmd
and :augroup
Feed the filename generation line module names from a $zmodules
array. This allows for:
Load order is important for modules like completion
and syntax-highlighting
that depend on settings introduced by other modules. This can not be achieved currently, as straight filename generation produces a strictly lexicographical load order. Alternatively, modules could just be named like ##-name
similar to some linux rc files, but I don't exactly find this method to be "clean".
My LSP setup works pretty well so far. However, there's still a couple of shortcomings to take care of:
mason-lspconfig
It would be nice to—at a minimum—be able to reload lsp/servers.lua
and have lspconfig re-ingest the result. Even better would be to (optionally) automatically reload any associated language servers attached to buffers.
Even better still, see how folke implements monitoring for config file changes to implement hot-reloading (e.g. lazy.nvim, neoconf.nvim). That would be cool. NOTE: I may actually get this for free with neoconf.
Additionally, I should look into perhaps going through mason-lspconfig
to set up my servers instead, to take advantage of its compatibility and automatic installation capabilities.
Airline has served me well enough over the years, but its performance issues are becoming quite grating, specifically how unreasonably long it takes to switch windows of all things. Certain statusline components really slow it down and I can't stand it any longer.
I'm torn between several choices, as of course, there isn't one that meets all my desires.
Language: VimL
background
swapping support
[ob
and ]ob
to accomodate the workaround
lightline#enable()
, which we can trigger on a ColorScheme
eventg:lightline.colorscheme
to the value of g:colors_name
I honestly would go with lightline as-is despite not being in Lua because it fits what I'm looking for pretty much perfectly. The issue with background
swapping is preventing me from pulling the trigger.
Language: Lua
background
and assign a function that will pick from either as appropriateColorScheme
and ColorSchemePre
autocmd eventsSo far, I think I will likely be going with this one, as it offers the most customizability short of creating my own from scratch.
Language: Lua
background
swapping :(A very good choice but definitely less flexible, and the issues with theming put me off of this one. I don't think I'll be going with this one; might be worth revisting in the future.
Language: Lua?
Technically the ideal choice, but requires the most effort. The only drawback is time.
NeoVim has matured a fair deal, and it may be a good time to switch. However, there are concerns that need research:
Some nice things to note:
:CheckHealth
vivid is a neat looking project that aims to simplify creation of LS_COLORS
by generating it based off of a YAML file. These YAML files are defined per colorscheme, so the resultant dircolors could match the rest of the environment.
Vivid is fundamentally different from the crowd-sourced LS_COLORS that I am currently using in that vivid intends to match a colorscheme while the latter is curated to specific colors that don't follow a particular colorscheme (as far as I know). Without customizations, I would likely be trading color diversity for uniformity.
Also, at the time of opening this issue, there is not a theme available for Tokyo Night, so I'd have to do that myself.
As of Git 1.7.10, it is possible to "include" other files. It would be a good idea to leverage this along with either a conditional deployment in Ansible or a Debian-style config-available
directory with symlinks. Git will silently ignore "missing" include files, so the latter approach should work well.
In addition to being an opportunity for organization, a particular pain point has been using my git config on other machines that are missing delta
and consequently being unable to use git log
, git blame
, git diff
, etc.
When I moved the variables to roles/nvim/defaults
, this broke the nvim_rebuild
playbook, as it no longer sees these variables. Figure out the proper way to go about this.
UltiSnips has served me very well over the years, but like everything else, I want to take advantage of Lua in this area. However, the replacement should be able to do, at a minimum, everything my current snippets can do and at least as much as the less esoteric features that UltiSnips offers.
Learn me a config management. Will work far better and require far less effort than rolling some jank install script.
One of the new features in 0.7 is the addition of the vim.keymap
API (see 16591), which provides a nicer interface than the lower level nvim_(buf_)set_keymap
function. Notably, this API takes advantage of being able to pass arbitrary Lua functions to mappings which was added somewhat recently; now I don't need to hack this in myself. It also supports mapping multiple modes at once and defaults to applying nvim_replace_termcodes
which is great.
Other than having the short "sugar" methods like key.nnoremap
there's not really any reason to keep these around now, especially when we can map multiple modes at once; the new API completely obviates the need for util.key
.
Specifying a file to open when running neovim causes the Alpha "Load Session" mapping to apply to that file rather than the Alpha buffer.
When using :Man
, the autocmd that controls formatting and disables Indent Guides ends up disabling them for all buffers. Do this locally.
The idea is that this would be mostly for comments and docstrings, but might have other uses.
Setting width:
[count]
gives an explicit widthb:aux_textwidth
g:aux_textwidth
Map to something like gQ<motion>
Over time, my initial vimfiles layout has proven insufficiently split in some cases, and unnecessarily redundant in others. Now that I'm switching to NeoVim, this is a good time for a refactor.
Consider simply moving this to .vimrc/init.vim since as of right now that file delegates everything and lacks any real substance of its own. However, keeping it separate does allow is to source config changes without invariably re-sourcing every other file.
Reorganize and reformat. The "sections" in general look pretty ugly. Go over all settings and refine anything as necessary, e.g. new characters for listchars
, etc.
fzf
The man
plugin may prove a bit tricky. We definitely want to keep it for the extra functionality that it provides vanilla Vim, and it has a few features not present in Neovim's man
plugin (e.g. [[
and ]]
). We could probably abuse has
and assorted trickery for Vim:
if !has('nvim')
Plug 'bruno-/vim-man'
endif
And for porting the extra features to Neovim, we could just throw them in $VIMFILES/ftplugin/man.vim or wherever. Also, make sure we address this for any other plugins if necessary.=
Implement functions as autoload functions for efficiency and organization; like functions can go in their own scope.
Implement the various filetype-related autocmds properly as ftplugin
configs, e.g. help
s q
mapping...
Not sure on this one, as I don't use Vim in Windows anymore. Look into how NeoVim runs on Windows...we may not have tmux, but at least NeoVim has the built-in terminals.
Either way, it should be refined or removed.
Perhaps we'll need different settings on BSD? There's no has()
-friendly way that I know of the check for BSD, so if we ever do, it'll have to be done in a more hacky way, probably via system('uname')
.
expand()
all instances of $VIM*
variables in configs. This way we can—for whatever reason—modify them on the fly by changing the environment we run (n)vim in.s:SetDefault()
functionencoding
)It would probably be a good thing to switch to NCM; it has quite a few neat features that YCM lacks (though the reverse is also true for a few things).
A few highlights (see Evernote for deeper analysis):
Overall, NCM is lighter, less complex and likely to be faster than YCM. Also, no compiled component to worry about when updating.
All aboard the Lua train! 🚂
nvim-autopairs looks to be more flexible than lexima and tries to integrate with Treesitter, which would hopefully solve some of my indent-related annoyances with lexima.
nvim-compe was deprecated some time ago and we should stop being lazy about it, especially since TJ has a nice video about it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.