mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-05 09:10:14 +00:00
add more comments and utilities
This commit is contained in:
@ -1,4 +1,7 @@
|
||||
{ pkgs, ... }: {
|
||||
|
||||
# Plugin for aligning text programmatically
|
||||
|
||||
plugins = [ pkgs.vimPlugins.tabular ];
|
||||
lua = ''
|
||||
-- Align
|
||||
|
@ -1,4 +1,7 @@
|
||||
{ pkgs, ... }: {
|
||||
|
||||
# Shows buffers in a VSCode-style tab layout
|
||||
|
||||
plugins = [
|
||||
pkgs.vimPlugins.bufferline-nvim
|
||||
pkgs.vimPlugins.vim-bbye # Better closing of buffers
|
||||
|
@ -1,5 +1,7 @@
|
||||
{ pkgs, lib, config, ... }: {
|
||||
|
||||
# Sets Neovim colors based on Nix colorscheme
|
||||
|
||||
options.colors = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.str;
|
||||
description = "Attrset of base16 colorscheme key value pairs.";
|
||||
|
@ -24,12 +24,14 @@
|
||||
end
|
||||
'';
|
||||
|
||||
# Enable Luasnip snippet completion
|
||||
snippet.expand = dsl.rawLua ''
|
||||
function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
end
|
||||
'';
|
||||
|
||||
# Basic completion keybinds
|
||||
mapping = {
|
||||
"['<C-n>']" = dsl.rawLua
|
||||
"require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Insert })";
|
||||
@ -64,24 +66,26 @@
|
||||
'';
|
||||
};
|
||||
|
||||
# These are where the completion engine gets its suggestions
|
||||
sources = [
|
||||
{ name = "nvim_lua"; }
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "luasnip"; }
|
||||
{ name = "path"; }
|
||||
{ name = "nvim_lua"; } # Fills in common Neovim lua functions
|
||||
{ name = "nvim_lsp"; } # LSP results
|
||||
{ name = "luasnip"; } # Snippets
|
||||
{ name = "path"; } # Shell completion from current PATH
|
||||
{
|
||||
name = "buffer";
|
||||
name = "buffer"; # Grep for text from the current text buffer
|
||||
keyword_length = 3;
|
||||
max_item_count = 10;
|
||||
}
|
||||
{
|
||||
name = "rg";
|
||||
name = "rg"; # Grep for text from the current directory
|
||||
keyword_length = 6;
|
||||
max_item_count = 10;
|
||||
option = { additional_arguments = "--ignore-case"; };
|
||||
}
|
||||
];
|
||||
|
||||
# Styling of the completion menu
|
||||
formatting = {
|
||||
fields = [ "kind" "abbr" "menu" ];
|
||||
format = dsl.rawLua ''
|
||||
|
Reference in New Issue
Block a user