repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

neovim: fix cmp and gitsigns

fc1e16222c20b67dc63a505e7ede5629d9a93f06

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (16)

+621 / −268 text lines

Diff layout

config.nu

Added
new file mode 100644

+287 / −0 text lines

1# Nushell Config File
2use table.nu *
3use os.nu *
4use prompt.nu *
5use aliases.nu *
6use todo.nu
7use openssl.nu *
8use pacnew.nu
9use syncthing.nu
11# for more information on themes see
12# https://github.com/nushell/nushell/blob/main/docs/How_To_Coloring_and_Theming.md
13let default_theme = {
14 # color for nushell primitives
15 separator: white
16 leading_trailing_space_bg: { attr: n } # no fg, no bg, attr non effectively turns this off
17 header: green_bold
18 empty: blue
19 bool: white
20 int: white
21 filesize: white
22 duration: white
23 date: white
24 range: white
25 float: white
26 string: white
27 nothing: white
28 binary: white
29 cellpath: white
30 row_index: green_bold
31 record: white
32 list: white
33 block: white
34 hints: dark_gray
36 # shapes are used to change the cli syntax highlighting
37 shape_garbage: { fg: "#FFFFFF" bg: "#FF0000" attr: b}
38 shape_binary: purple_bold
39 shape_bool: light_cyan
40 shape_int: purple_bold
41 shape_float: purple_bold
42 shape_range: yellow_bold
43 shape_internalcall: cyan_bold
44 shape_external: cyan
45 shape_externalarg: green_bold
46 shape_literal: blue
47 shape_operator: yellow
48 shape_signature: green_bold
49 shape_string: green
50 shape_string_interpolation: cyan_bold
51 shape_datetime: cyan_bold
52 shape_list: cyan_bold
53 shape_table: blue_bold
54 shape_record: cyan_bold
55 shape_block: blue_bold
56 shape_filepath: cyan
57 shape_globpattern: cyan_bold
58 shape_variable: purple
59 shape_flag: blue_bold
60 shape_custom: green
61 shape_nothing: light_cyan
62}
64# The default config record. This is where much of your global configuration is setup.
65$env.config = {
66 show_banner: false
67 table: {
68 mode: light # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other
69 }
70 ls: {
71 use_ls_colors: true
72 clickable_links: true
73 }
74 rm: {
75 always_trash: true
76 }
77 color_config: $default_theme
78 use_grid_icons: true
79 footer_mode: "auto" # always, never, number_of_rows, auto
80 completions: {
81
82 quick: true # set this to false to prevent auto-selecting completions when only one remains
83 partial: true # set this to false to prevent partial filling of the prompt
84 }
85 float_precision: 2
86 use_ansi_coloring: true
87 filesize: {
88 metric: false
89 format: "auto" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, zb, zib, auto
90 }
91 edit_mode: emacs # emacs, vi
92 history: {
93 file_format: "plaintext"
94 max_size: 10000
95 sync_on_enter: true # Enable to share the history between multiple sessions, else you have to close the session to persist history to file
96 }
97 menus: [
98 # Configuration for default nushell menus
99 # Note the lack of source parameter
100 {
101 name: completion_menu
102 only_buffer_difference: false
103 marker: "| "
104 type: {
105 layout: columnar
106 columns: 4
107 # col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
108 col_padding: 2
109 }
110 style: {
111 text: green
112 selected_text: green_reverse
113 description_text: yellow
114 }
115 }
116 {
117 name: history_menu
118 only_buffer_difference: true
119 marker: "? "
120 type: {
121 layout: list
122 page_size: 10
123 }
124 style: {
125 text: green
126 selected_text: green_reverse
127 description_text: yellow
128 }
129 }
130 {
131 name: help_menu
132 only_buffer_difference: true
133 marker: "? "
134 type: {
135 layout: description
136 columns: 4
137 col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
138 col_padding: 2
139 selection_rows: 4
140 description_rows: 10
141 }
142 style: {
143 text: green
144 selected_text: green_reverse
145 description_text: yellow
146 }
147 }
148 # Example of extra menus created using a nushell source
149 # Use the source field to create a list of records that populates
150 # the menu
151 {
152 name: commands_menu
153 only_buffer_difference: false
154 marker: "# "
155 type: {
156 layout: columnar
157 columns: 4
158 col_width: 20
159 col_padding: 2
160 }
161 style: {
162 text: green
163 selected_text: green_reverse
164 description_text: yellow
165 }
166 source: { |buffer, position|
167 $nu.scope.commands
168 | where command =~ $buffer
169 | each { |it| {value: $it.command description: $it.usage} }
170 }
171 }
172 {
173 name: vars_menu
174 only_buffer_difference: true
175 marker: "# "
176 type: {
177 layout: list
178 page_size: 10
179 }
180 style: {
181 text: green
182 selected_text: green_reverse
183 description_text: yellow
184 }
185 source: { |buffer, position|
186 $nu.scope.vars
187 | where name =~ $buffer
188 | sort-by name
189 | each { |it| {value: $it.name description: $it.type} }
190 }
191 }
192 {
193 name: commands_with_description
194 only_buffer_difference: true
195 marker: "# "
196 type: {
197 layout: description
198 columns: 4
199 col_width: 20
200 col_padding: 2
201 selection_rows: 4
202 description_rows: 10
203 }
204 style: {
205 text: green
206 selected_text: green_reverse
207 description_text: yellow
208 }
209 source: { |buffer, position|
210 $nu.scope.commands
211 | where command =~ $buffer
212 | each { |it| {value: $it.command description: $it.usage} }
213 }
214 }
215 ]
216 keybindings: [
217 {
218 name: completion_menu
219 modifier: none
220 keycode: tab
221 mode: emacs # Options: emacs vi_normal vi_insert
222 event: {
223 until: [
224 { send: menu name: completion_menu }
225 { send: menunext }
226 ]
227 }
228 }
229 {
230 name: completion_previous
231 modifier: shift
232 keycode: backtab
233 mode: [emacs, vi_normal, vi_insert] # Note: You can add the same keybinding to all modes by using a list
234 event: { send: menuprevious }
235 }
236 {
237 name: history_menu
238 modifier: control
239 keycode: char_x
240 mode: emacs
241 event: {
242 until: [
243 { send: menu name: history_menu }
244 { send: menupagenext }
245 ]
246 }
247 }
248 {
249 name: history_previous
250 modifier: control
251 keycode: char_z
252 mode: emacs
253 event: {
254 until: [
255 { send: menupageprevious }
256 { edit: undo }
257 ]
258 }
259 }
260 # Keybindings used to trigger the user defined menus
261 {
262 name: commands_menu
263 modifier: control
264 keycode: char_t
265 mode: [emacs, vi_normal, vi_insert]
266 event: { send: menu name: commands_menu }
267 }
268 {
269 name: vars_menu
270 modifier: control
271 keycode: char_y
272 mode: [emacs, vi_normal, vi_insert]
273 event: { send: menu name: vars_menu }
274 }
275 {
276 name: commands_with_description
277 modifier: control
278 keycode: char_u
279 mode: [emacs, vi_normal, vi_insert]
280 event: { send: menu name: commands_with_description }
281 } ]
282}
284# must be done, after defining config, since zoxide mutates it
285use zoxide.nu *
287overlay use coreutils.nu

env.nu

Added
new file mode 100644

+45 / −0 text lines

1# GLOBAL VARIABLES
2# GLOBAL VARIABLES
3
4$env.WIN32 = ( $nu.os-info.name =~ "windows" )
5$env.NURC_DIR = ( $nu.config-path | path expand | path dirname )
6$env.DOTFILES = ( $env.NURC_DIR | path join ".." | path expand )
7$env.WORKSPACE = if $env.WIN32 { "W:/" } else { "~/Workspace" | path expand }
8$env.NOTES = if $env.WIN32 { "N:/" } else { "~/Notes" | path expand }
9if ($env | get -i TERM_PROGRAM) == WezTerm {
10 $env.TERM = "wezterm"
11 $env.TERMCAP = ~/.terminfo/w/wezterm
12}
14# theme for ls and other programs, that use LS_COLORS
15$env.LS_COLORS = (try { vivid generate ayu | into string } catch {""})
17# Specifies how environment variables are:
18# - converted from a string to a value on Nushell startup (from_string)
19# - converted from a value back to a string when running external commands (to_string)
20# Note: The conversions happen *after* config.nu is loaded
21$env.ENV_CONVERSIONS = {
22 "PATH": {
23 from_string: { |s| $s | split row (char esep) }
24 to_string: { |v| $v | str join (char esep) }
25 }
26 "Path": {
27 from_string: { |s| $s | split row (char esep) }
28 to_string: { |v| $v | str join (char esep) }
29 }
30}
32# Directories to search for scripts when calling source or use
33$env.NU_LIB_DIRS = [
34 ($nu.config-path | path dirname | path join 'modules'),
35 ($nu.config-path | path dirname | path join 'completions')
36]
38alias cb = flatpak run app.getclipboard.Clipboard
40$env.CLIPBOARD_EDITOR = nvim
41$env.CLIPBOARD_HISTORY = 100000
42$env.CLIPBOARD_PERSISTDIR = /home/oli/Clipboard
43$env.CLIPBOARD_NOAUDIO = 1
44# $env.CLIPBOARD_NOGUI = 1
45$env.CLIPBOARD_THEME = light

neovim/README.md

Modified

+2 / −0 text lines

3737* add nu-check to nvim-lint
3838* autocomplete in cmdline does not work no more
3939* make telescope highlights more like NormalFloat
40* create facade over vim.api.nvim_create_user_command
41* fix autocomplete in cmdline

neovim/lazy-lock.json

Modified

+23 / −21 text lines

33 "LuaSnip": { "branch": "master", "commit": "0b4950a237ce441a6a3a947d501622453f6860ea" },
44 "better-escape.nvim": { "branch": "master", "commit": "7031dc734add47bb71c010e0551829fa5799375f" },
55 "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
6 "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
6 "cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" },
77 "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
8 "cmp-nvim-lsp-document-symbol": { "branch": "main", "commit": "f0f53f704c08ea501f9d222b23491b0d354644b0" },
9 "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" },
810 "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
911 "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
1012 "diffview.nvim": { "branch": "main", "commit": "d38c1b5266850f77f75e006bcc26213684e1e141" },
1113 "dressing.nvim": { "branch": "master", "commit": "1f2d1206a03bd3add8aedf6251e4534611de577f" },
12 "flash.nvim": { "branch": "main", "commit": "6d76c5dee65181ab55cbdfb0760260e800d643f4" },
14 "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" },
1315 "friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" },
14 "gen.nvim": { "branch": "main", "commit": "c7ead6c815fa9c2c0849db666b777b592610a226" },
15 "gitsigns.nvim": { "branch": "main", "commit": "ff01d34daaed72f271a8ffa088a7e839a60c640f" },
16 "gen.nvim": { "branch": "main", "commit": "de6952db44082b8931a237d6af7fa729a06f6b25" },
17 "gitsigns.nvim": { "branch": "main", "commit": "5a9a6ac29a7805c4783cda21b80a1e361964b3f2" },
1618 "glow.nvim": { "branch": "main", "commit": "5b38fb7b6e806cac62707a4aba8c10c5f14d5bb5" },
1719 "heirline.nvim": { "branch": "master", "commit": "7f1e805dfc001d5dbb7d894105063f463f6c7dcc" },
1820 "hlargs.nvim": { "branch": "main", "commit": "6218a401824c5733ac50b264991b62d064e85ab2" },
19 "indent-blankline.nvim": { "branch": "master", "commit": "0fe34b4c1b926e106d105d3ae88ef6cbf6743572" },
20 "lazy.nvim": { "branch": "main", "commit": "276e572f645430bcfd6fd25faa301ea9077f6ab1" },
21 "indent-blankline.nvim": { "branch": "master", "commit": "046e2cf04e08ece927bacbfb87c5b35c0b636546" },
22 "lazy.nvim": { "branch": "main", "commit": "e42fccc3cda70266e0841c5126de2c23e8982800" },
2123 "lspkind.nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
2224 "lush.nvim": { "branch": "main", "commit": "966aad1accd47fa11fbe2539234f81f678fef2de" },
2325 "mason.nvim": { "branch": "main", "commit": "cd7835b15f5a4204fc37e0aa739347472121a54c" },
2426 "mini.align": { "branch": "main", "commit": "e3a0c114d3fea0479f8e8ee3e273c7ca4ba6ea8d" },
2527 "mini.bracketed": { "branch": "main", "commit": "d99f8f6c93e2a4cff1ebc27072d74ba400c8d241" },
26 "mini.colors": { "branch": "main", "commit": "9b97254bed6258d8174fa436cc9e54b13ba4c0ac" },
27 "mini.starter": { "branch": "main", "commit": "733224e90e842a2fb6dba9eaae2dc765ba9d6a41" },
28 "mini.colors": { "branch": "main", "commit": "a84b460fd5012a6af878d6beb96e912181f25c30" },
29 "mini.starter": { "branch": "main", "commit": "c74bdde61385360b02ca9fd7731ebce8903d78d7" },
2830 "mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" },
29 "neodev.nvim": { "branch": "main", "commit": "a4b6e7ca11ff5be2264d5c169fcedd97d8699ec4" },
31 "neodev.nvim": { "branch": "main", "commit": "d617d9eb27e73e701e446874c6ea2cb528719260" },
3032 "neogen": { "branch": "main", "commit": "70127baaff25611deaf1a29d801fc054ad9d2dc1" },
31 "noice.nvim": { "branch": "main", "commit": "b990101f508b29470bfa16cdf3c08f040d85b435" },
33 "noice.nvim": { "branch": "main", "commit": "50fc77bcd75cf32374521fb227e9f41f3fe1521a" },
3234 "nrpattern.nvim": { "branch": "master", "commit": "f862ce687761078ef3155688151c55f69d28453e" },
3335 "nui.nvim": { "branch": "main", "commit": "c0c8e347ceac53030f5c1ece1c5a5b6a17a25b32" },
34 "nvim-autopairs": { "branch": "master", "commit": "748e72c05495a3d30e88a6ef04b21697019a9aa9" },
35 "nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" },
36 "nvim-autopairs": { "branch": "master", "commit": "0f04d78619cce9a5af4f355968040f7d675854a1" },
37 "nvim-cmp": { "branch": "main", "commit": "51260c02a8ffded8e16162dcf41a23ec90cfba62" },
3638 "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" },
3739 "nvim-genghis": { "branch": "main", "commit": "ba59d6fd8440c9b8928acd22b845d18fe9a8b848" },
3840 "nvim-gomove": { "branch": "main", "commit": "2b44ae7ac0804f4e3959228122f7c85bef1964e3" },
3941 "nvim-lastplace": { "branch": "main", "commit": "0bb6103c506315044872e0f84b1f736c4172bb20" },
4042 "nvim-neoclip.lua": { "branch": "main", "commit": "4e406ae0f759262518731538f2585abb9d269bac" },
4143 "nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" },
42 "nvim-surround": { "branch": "main", "commit": "1c2ef599abeeb98e40706830bcd27e90e259367a" },
43 "nvim-treesitter": { "branch": "master", "commit": "eefea35865f1fccc090af7700453d8a979c92035" },
44 "nvim-treesitter-textobjects": { "branch": "master", "commit": "76c7a89b41de77a4f83fb77fa072c5ad7605fe3b" },
44 "nvim-surround": { "branch": "main", "commit": "4f0e1f470595af067eca9b872778d83c7f52f134" },
45 "nvim-treesitter": { "branch": "master", "commit": "44762abc90725e279f3b9cfbe4cafb41ea72f09b" },
46 "nvim-treesitter-textobjects": { "branch": "master", "commit": "eb208bfdfcf76efea0424747e23e44641e13aaa6" },
4547 "nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" },
4648 "nvim-ts-context-commentstring": { "branch": "main", "commit": "92e688f013c69f90c9bbd596019ec10235bc51de" },
47 "nvim-web-devicons": { "branch": "master", "commit": "3af745113ea537f58c4b1573b64a429fefad9e07" },
48 "oil.nvim": { "branch": "stevearc-trash", "commit": "b62f680059fffcf7ff89fd88126fbca12418df20" },
49 "persistence.nvim": { "branch": "main", "commit": "9730a073fd8270e91729d666bcef6a5abc007f02" },
49 "nvim-web-devicons": { "branch": "master", "commit": "5de460ca7595806044eced31e3c36c159a493857" },
50 "oil.nvim": { "branch": "stevearc-trash", "commit": "9487fdfeb5b50ebcd46e644fbdc9d15ac9b9f55d" },
51 "persistence.nvim": { "branch": "main", "commit": "ad538bfd5336f1335cdb6fd4e0b0eebfa6e12f32" },
5052 "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
5153 "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
52 "schemastore.nvim": { "branch": "main", "commit": "f3c4985093716c8ddf93731609ebfc1df7c5335d" },
54 "schemastore.nvim": { "branch": "main", "commit": "e0884542c973b92a193274eaebedd8d2ae05ceb5" },
5355 "specs.nvim": { "branch": "main", "commit": "2743e412bbe21c9d73954c403d01e8de7377890d" },
5456 "substitute.nvim": { "branch": "main", "commit": "cf35db50188f3d7de624ae391c9bb9f2e9de5610" },
5557 "symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" },
6264 "treesj": { "branch": "main", "commit": "070e6761d0b11a55446d988a69908f7a0928dbab" },
6365 "twilight.nvim": { "branch": "main", "commit": "8b7b50c0cb2dc781b2f4262a5ddd57571556d1e4" },
6466 "virt-column.nvim": { "branch": "master", "commit": "9c82009c53e5f9d43b6c0f5e8cb69c53663b786a" },
65 "which-key.nvim": { "branch": "main", "commit": "6962dae3565369363b59dd51fb206051555fcb4d" },
66 "zen-mode.nvim": { "branch": "main", "commit": "cb73b8bd0ef9d765b942db09dc762c603a89ae44" }
67 "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" },
68 "zen-mode.nvim": { "branch": "main", "commit": "50e2e2a36cc97847d9ab3b1a3555ba2ef6839b50" }
6769}No final newline

neovim/lua/bugabinga/lsp/init.lua

Modified

+6 / −1 text lines

6161 local buffer_path = vim.api.nvim_buf_get_name( bufnr )
63 vim.print( 'searching lsp client for:', match, bufnr, buffer_path )
63 vim.notify( string.format( 'searching lsp client for: match: %s, buffer: %s, path: %s', match, bufnr, buffer_path ) )
6565 local potential_client_configs = vim.iter( lsp_client_configs )
6666 :map( function ( config )
104104 return
105105 end
107 -- TODO: LspStart
108 -- TODO: LspStop
109 -- TODO: stop lsp on vim idle/ficus lost?
110 -- FIXME: lsp detach errors
107112 for _, config in ipairs( potential_client_configs ) do
108113 local root_dir = type( config.root_dir ) == 'string' and config.root_dir or config.root_dir( buffer_path )
109114 local capabilities = vim.lsp.protocol.make_client_capabilities()

neovim/lua/bugabinga/nugu/init.lua

Modified

+7 / −7 text lines

3939local content_accent = hsl( palette.content_accent )
4040local content_minor = hsl( palette.content_minor )
4141local content_focus = hsl( palette.content_focus )
42local content_unfocus = flux(hsl( palette.content_unfocus ), 33) -- FIXME: this change needs to go into nugu
42local content_unfocus = flux( hsl( palette.content_unfocus ), 33 ) -- FIXME: this change needs to go into nugu
4343local content_important_global = hsl( palette.content_important_global )
4444local content_important_local = hsl( palette.content_important_local )
6868 FloatBorder { fg = ui_accent, bg = Normal.bg },
6969 ColorColumn { fg = ui_important_global, bg = Normal.bg },
7070 Conceal { fg = content_focus, bg = Normal.bg },
71 -- Cursor { bg = ui_accent },
71 Cursor { bg = ui_accent },
7272 -- lCursor { Cursor },
7373 -- CursorIM { Cursor },
7474 Directory { fg = Normal.fg },
102102 SpellCap { SpellBad },
103103 SpellLocal { SpellBad },
104104 SpellRare { SpellBad },
105 StatusLine { fg = ui_normal, bg = ui_backdrop },
106 StatusLineNC { fg = ui_minor, bg = ui_backdrop },
107 Winbar { fg = ui_normal, bg = LineNr.bg },
105 StatusLine { fg = ui_focus, bg = ui_unfocus },
106 StatusLineNC { fg = ui_normal, bg = ui_unfocus },
107 Winbar { fg = ui_focus, bg = StatusLine.bg },
108108 WinbarNC { fg = ui_minor, bg = LineNr.bg },
109109 Title { fg = content_important_global, sp = content_important_global, gui = 'bold underline' },
110110 TabLine { StatusLine },
111 TabLineFill { bg = TabLine.bg },
112 TabLineSel { fg = ui_important_global.readable(), bg = ui_important_global, gui = 'underline bold' },
111 TabLineFill { fg = TabLine.fg, bg = content_backdrop },
112 TabLineSel { fg = ui_important_global, bg = ui_unfocus },
113113 Visual { fg = content_focus.readable(), bg = content_focus },
114114 VisualNOS { fg = Visual.fg, bg = flux( Visual.bg, -42 ) },
115115 WarningMsg { fg = warning, gui = 'bold' },

neovim/lua/bugabinga/options/keymaps.lua

Modified

+3 / −24 text lines

8888-- system clipboard copy and paste
8989map.normal.visual {
90 description = 'yank into system clipboard',
90 description = 'system clipboard motion',
9191 category = 'editing',
92 keys = '<leader>y',
93 command = '"+y',
94}
96map.normal.visual {
97 description = 'yank line into system clipboard',
98 category = 'editing',
99 keys = '<leader>Y',
100 command = '"+Y',
101}
103map.normal.visual {
104 description = 'paste before from system clipboard',
105 category = 'editing',
106 keys = '<leader>p',
107 command = '"+p',
108}
110map.normal.visual {
111 description = 'paste after from system clipboard',
112 category = 'editing',
113 keys = '<leader>P',
114 command = '"+P',
92 keys = '<c-v>',
93 command = '"+',
11796map.insert {

neovim/lua/bugabinga/plugins/autopairs.lua

Modified

+19 / −3 text lines

1local ignored = require 'std.ignored'
2
13return {
2 'windwp/nvim-autopairs',
3 event = "InsertEnter",
4 opts = {}
4 'windwp/nvim-autopairs',
5 event = 'InsertEnter',
6 dependencies = {
7 'hrsh7th/nvim-cmp'
8 },
9 config = function ()
10 local autopairs = require 'nvim-autopairs'
11 autopairs.setup {
12 disable_filetype = ignored.filetypes,
13 }
14 local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
15 local cmp = require 'cmp'
16 cmp.event:on(
17 'confirm_done',
18 cmp_autopairs.on_confirm_done()
19 )
20 end
521}

neovim/lua/bugabinga/plugins/cmp.lua

Modified

+36 / −32 text lines

66 dependencies = {
77 'hrsh7th/cmp-buffer',
88 'hrsh7th/cmp-nvim-lsp',
9 'hrsh7th/cmp-cmdline',
109 'hrsh7th/cmp-path',
10 'hrsh7th/cmp-nvim-lsp-document-symbol',
11 'hrsh7th/cmp-nvim-lsp-signature-help',
12 'hrsh7th/cmp-emoji',
1113 { 'L3MON4D3/LuaSnip', version = '2.*', build = 'make install_jsregexp' },
1214 'saadparwaiz1/cmp_luasnip',
1315 'rafamadriz/friendly-snippets',
2830 },
2931 completion = {
3032 autocomplete = false,
31 -- completeopt = 'menu,menuone,preview,noselect',
33 completeopt = 'menu,menuone,preview,noselect',
34 },
35 window = {
36 completion = cmp.config.window.bordered(),
37 documentation = cmp.config.window.bordered(),
3238 },
3339 formatting = {
3440 format = lspkind.cmp_format {
3743 ellipsis_char = '…',
3844 },
3945 },
40 experimental = { ghost_text = true, },
46 -- experimental = { ghost_text = true, },
4147 preselect = cmp.PreselectMode.None,
4248 snippet = { expand = function ( args ) luasnip.lsp_expand( args.body ) end },
4349 mapping = {
4551 ['<c-n>'] = cmp.mapping.select_next_item(),
4652 ['<c-k>'] = cmp.mapping.select_prev_item(),
4753 ['<c-j>'] = cmp.mapping.select_next_item(),
48 -- ['<s-tab>'] = cmp.mapping.select_prev_item(),
49 -- ['<tab>'] = cmp.mapping.select_next_item(),
54 ['<tab>'] = cmp.mapping( function ( fallback )
55 if cmp.visible() then
56 cmp.select_next_item()
57 elseif luasnip.expand_or_locally_jumpable() then
58 luasnip.expand_or_jump()
59 else
60 fallback()
61 end
62 end, { 'i', 's' } ),
63 ['<s-tab>'] = cmp.mapping( function ( fallback )
64 if cmp.visible() then
65 cmp.select_prev_item()
66 elseif luasnip.locally_jumpable( -1 ) then
67 luasnip.jump( -1 )
68 else
69 fallback()
70 end
71 end, { 'i', 's' } ),
5072 ['<c-b>'] = cmp.mapping.scroll_docs( -2 ),
5173 ['<c-f>'] = cmp.mapping.scroll_docs( 2 ),
5274 ['<c-u>'] = cmp.mapping.scroll_docs( -4 ),
5375 ['<c-d>'] = cmp.mapping.scroll_docs( 4 ),
5476 ['<c-space>'] = cmp.mapping.complete {},
5577 ['<esc>'] = cmp.mapping.abort(),
56 ['<cr>'] = cmp.mapping.confirm { select = false }
78 ['<cr>'] = cmp.mapping.confirm {
79 behaviour = cmp.ConfirmBehavior.Replace,
80 select = true,
81 }
5782 },
5883 sources = cmp.config.sources {
59 { name = 'luasnip' },
84 { name = 'nvim_lsp_signature_help' },
6085 { name = 'nvim_lsp' },
61 { name = 'buffer' },
86 { name = 'nvim_lsp_document_symbol' },
87 { name = 'luasnip' },
6288 { name = 'path' },
89 { name = 'emoji' },
90 { name = 'buffer', keyword_length = 3 },
6391 }
6492 }
72100 { name = 'path' },
73101 }
74102 } )
76 cmp.setup.cmdline( '/', {
77 mapping = cmp.mapping.preset.cmdline(),
78 sources = {
79 { name = 'buffer' }
80 }
81 } )
83 cmp.setup.cmdline( '?', {
84 mapping = cmp.mapping.preset.cmdline(),
85 sources = {
86 { name = 'buffer' }
87 }
88 } )
90 cmp.setup.cmdline( ':', {
91 mapping = cmp.mapping.preset.cmdline(),
92 sources = cmp.config.sources {
93 { name = 'path' }
94 },
95 {
96 { name = 'cmdline' }
97 }
98 } )
99103 end,

neovim/lua/bugabinga/plugins/gitsigns.lua

Modified

+124 / −125 text lines

1212 changedelete = { text = '~' },
1313 untracked = { text = '┆' },
1414 },
15 },
16 preview_config = {
17 border = vim.g.border_style,
18 },
19 current_line_blame = true,
20 current_line_blame_opts = {
21 ignore_whitespace = true,
22 },
23 current_line_blame_formatter = '<author>(<author_time:%d.%m.%Y>): <summary>',
24 -- FIXME: on_attach seemingly never gets called
25 on_attach = function ( bufnr )
26 local gitsigns = require 'gitsigns'
15 preview_config = {
16 border = vim.g.border_style,
17 },
18 current_line_blame = true,
19 current_line_blame_opts = {
20 ignore_whitespace = true,
21 },
22 current_line_blame_formatter = '<author>(<author_time:%d.%m.%Y>): <summary>',
23 on_attach = function ( bufnr )
24 local gitsigns = require 'gitsigns'
28 map.normal {
29 description = 'Goto next hunk',
30 category = 'git',
31 keys = ']h',
32 buffer = bufnr,
33 command = gitsigns.next_hunk,
34 }
26 map.normal {
27 description = 'Goto next hunk',
28 category = 'git',
29 keys = ']h',
30 buffer = bufnr,
31 command = gitsigns.next_hunk,
32 }
36 map.normal {
37 description = 'Goto previous hunk',
38 category = 'git',
39 keys = '[h',
40 buffer = bufnr,
41 command = gitsigns.prev_hunk,
42 }
34 map.normal {
35 description = 'Goto previous hunk',
36 category = 'git',
37 keys = '[h',
38 buffer = bufnr,
39 command = gitsigns.prev_hunk,
40 }
44 map.normal {
45 description = 'Stage hunk',
46 category = 'git',
47 keys = '<leader>hs',
48 buffer = bufnr,
49 command = gitsigns.stage_hunk,
50 }
42 map.normal {
43 description = 'Stage hunk',
44 category = 'git',
45 keys = '<leader>hs',
46 buffer = bufnr,
47 command = gitsigns.stage_hunk,
48 }
52 map.visual_select {
53 description = 'Stage hunk',
54 category = 'git',
55 keys = '<leader>hs',
56 buffer = bufnr,
57 command = function () gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } end,
58 }
50 map.visual_select {
51 description = 'Stage hunk',
52 category = 'git',
53 keys = '<leader>hs',
54 buffer = bufnr,
55 command = function () gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } end,
56 }
60 map.normal {
61 description = 'Reset hunk',
62 category = 'git',
63 keys = '<leader>hr',
64 buffer = bufnr,
65 command = gitsigns.reset_hunk,
66 }
58 map.normal {
59 description = 'Reset hunk',
60 category = 'git',
61 keys = '<leader>hr',
62 buffer = bufnr,
63 command = gitsigns.reset_hunk,
64 }
68 map.visual_select {
69 description = 'Reset hunk',
70 category = 'git',
71 keys = '<leader>hr',
72 buffer = bufnr,
73 command = function () gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } end,
74 }
66 map.visual_select {
67 description = 'Reset hunk',
68 category = 'git',
69 keys = '<leader>hr',
70 buffer = bufnr,
71 command = function () gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } end,
72 }
76 map.normal {
77 description = 'Undo stage hunk',
78 category = 'git',
79 keys = '<leader>hu',
80 buffer = bufnr,
81 command = gitsigns.undo_stage_hunk,
82 }
74 map.normal {
75 description = 'Undo stage hunk',
76 category = 'git',
77 keys = '<leader>hu',
78 buffer = bufnr,
79 command = gitsigns.undo_stage_hunk,
80 }
84 map.normal {
85 description = 'Stage buffer',
86 category = 'git',
87 keys = '<leader>hS',
88 buffer = bufnr,
89 command = gitsigns.stage_buffer,
90 }
82 map.normal {
83 description = 'Stage buffer',
84 category = 'git',
85 keys = '<leader>hS',
86 buffer = bufnr,
87 command = gitsigns.stage_buffer,
88 }
92 map.normal {
93 description = 'Reset buffer',
94 category = 'git',
95 keys = '<leader>hR',
96 buffer = bufnr,
97 command = gitsigns.reset_buffer,
98 }
90 map.normal {
91 description = 'Reset buffer',
92 category = 'git',
93 keys = '<leader>hR',
94 buffer = bufnr,
95 command = gitsigns.reset_buffer,
96 }
100 map.normal {
101 description = 'Preview hunk',
102 category = 'git',
103 keys = '<leader>hp',
104 buffer = bufnr,
105 command = gitsigns.preview_hunk,
106 }
98 map.normal {
99 description = 'Preview hunk',
100 category = 'git',
101 keys = '<leader>hp',
102 buffer = bufnr,
103 command = gitsigns.preview_hunk,
104 }
108 map.normal {
109 description = 'Blame line',
110 category = 'git',
111 keys = '<leader>hb',
112 buffer = bufnr,
113 command = function () gitsigns.blame_line { full = true } end,
114 }
106 map.normal {
107 description = 'Blame line',
108 category = 'git',
109 keys = '<leader>hb',
110 buffer = bufnr,
111 command = function () gitsigns.blame_line { full = true } end,
112 }
116 map.normal {
117 description = 'Diff this',
118 category = 'git',
119 keys = '<leader>hd',
120 buffer = bufnr,
121 command = gitsigns.diffthis,
122 }
114 map.normal {
115 description = 'Diff this',
116 category = 'git',
117 keys = '<leader>hd',
118 buffer = bufnr,
119 command = gitsigns.diffthis,
120 }
124 map.normal {
125 description = 'Diff this ~',
126 category = 'git',
127 keys = '<leader>hD',
128 buffer = bufnr,
129 command = function () gitsigns.diffthis '~' end,
130 }
122 map.normal {
123 description = 'Diff this ~',
124 category = 'git',
125 keys = '<leader>hD',
126 buffer = bufnr,
127 command = function () gitsigns.diffthis '~' end,
128 }
132 map.normal {
133 description = 'Toggle current line blame',
134 category = 'git',
135 keys = '<leader>tb',
136 buffer = bufnr,
137 command = gitsigns.toggle_current_line_blame,
138 }
130 map.normal {
131 description = 'Toggle current line blame',
132 category = 'git',
133 keys = '<leader>tb',
134 buffer = bufnr,
135 command = gitsigns.toggle_current_line_blame,
136 }
140 map.normal {
141 description = 'Toggle deleted',
142 category = 'git',
143 keys = '<leader>td',
144 buffer = bufnr,
145 command = gitsigns.toggle_deleted,
146 }
138 map.normal {
139 description = 'Toggle deleted',
140 category = 'git',
141 keys = '<leader>td',
142 buffer = bufnr,
143 command = gitsigns.toggle_deleted,
144 }
148 map.operator_pending.visual {
149 description = 'select hunk',
150 category = 'git',
151 keys = 'ih',
152 buffer = bufnr,
153 command = ':<C-U>Gitsigns select_hunk<CR>'
154 }
155 end
146 map.operator_pending.visual {
147 description = 'select hunk',
148 category = 'git',
149 keys = 'ih',
150 buffer = bufnr,
151 command = ':<C-U>Gitsigns select_hunk<CR>'
152 }
153 end,
154 }

neovim/lua/bugabinga/plugins/heirline.lua

Modified

+10 / −7 text lines

536536 end,
537537 hl = function ( self )
538538 if self.is_active then
539 return { fg = utils.get_highlight 'TablineSel'.fg }
539 return { fg = utils.get_highlight 'TabLineSel'.fg }
540540 elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then
541 return { fg = 'ui_minor' }
541 return { fg = 'ui_normal' }
542542 else
543 return { fg = utils.get_highlight 'Tabline'.fg }
543 return { fg = utils.get_highlight 'TabLine'.fg }
544544 end
545545 end,
546546 }
583583 if self.is_active then
584584 return 'TabLineSel'
585585 elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then
586 return { fg = 'ui_minor' }
586 return { fg = 'ui_normal' }
587587 else
588588 return 'TabLine'
589589 end
612612 }
614614 local tabline_buffer_block = utils.surround(
615 { icon.block, icon.block },
615 {
616 ' ' .. icon.slant_left,
617 icon.slant_right .. ' ',
618 },
616619 function ( self )
617620 if self.is_active then
618621 return utils.get_highlight 'TabLineSel'.bg
626629 local buffer_line = utils.make_buflist(
627630 tabline_buffer_block,
628 { provider = icon.arrow_left, hl = { fg = 'ui_minor', bg = 'ui_backdrop' } },
629 { provider = icon.arrow_right, hl = { fg = 'ui_minor', bg = 'ui_backdrop' } }
631 { provider = icon.arrow_left .. ' ', hl = 'TabLineFill' },
632 { provider = ' ' .. icon.arrow_right, hl = 'TabLineFill' }
630633 )
632635 local tabpage = {

neovim/lua/bugabinga/plugins/telescope.lua

Modified

+44 / −37 text lines

55 name = 'ripgrep',
66 name_of_executable = 'rg'
77}
8 {
9 name = 'find-fd',
10 name_of_executable = 'fd'
11 }
8 {
9 name = 'find-fd',
10 name_of_executable = 'fd'
11 }
1313return {
1414 'nvim-telescope/telescope.nvim',
2222 'nvim-telescope/telescope-ui-select.nvim',
2323 'jvgrootveld/telescope-zoxide',
2424 },
25 config = function()
25 config = function ()
2626 local telescope = require 'telescope'
2727 local builtin = require 'telescope.builtin'
2828 local actions = require 'telescope.actions'
4343 preview_cutoff = 124,
4444 },
4545 file_ignore_patterns = {
46 ".git/",
47 ".cache",
48 "%.o",
49 "%.a",
50 "%.out",
51 "%.class",
52 "%.pdf",
53 "%.mkv",
54 "%.mp4",
55 "%.zip",
46 '.git/',
47 '.cache',
48 '%.o',
49 '%.a',
50 '%.out',
51 '%.class',
52 '%.pdf',
53 '%.mkv',
54 '%.mp4',
55 '%.zip',
5656 },
5757 mappings = {
5858 i = {
59 ['<C-j>'] = actions.cycle_history_next,
60 ['<C-k>'] = actions.cycle_history_prev,
61 ['<C-n>'] = actions.move_selection_next,
62 ['<C-p>'] = actions.move_selection_previous,
63 ['<C-s>'] = actions.file_split,
59 ['<c-j>'] = actions.cycle_history_next,
60 ['<c-k>'] = actions.cycle_history_prev,
61 ['<c-n>'] = actions.move_selection_next,
62 ['<c-p>'] = actions.move_selection_previous,
63 ['<c-s>'] = actions.file_split,
6464 },
6565 n = { q = actions.close },
6666 },
9191 description = 'Search help files',
9292 category = 'help',
9393 keys = '<F1>',
94 command = function() builtin.help_tags(dropdown) end,
94 command = function () builtin.help_tags( dropdown ) end,
95 }
97 map.normal {
98 description = 'Open last search...',
99 category = 'plugins',
100 keys = '<c-p>',
101 command = function () builtin.resume() end,
95102 }
97104 map.normal {
98105 description = 'Open search for commands...',
99106 category = 'plugins',
100 keys = '<C-p>',
101 command = function() builtin.commands() end,
107 keys = '<c-p><c-m>',
108 command = function () builtin.commands() end,
102109 }
104111 map.normal {
105112 description = 'Open search for all files...',
106113 category = 'search',
107 keys = '<C-p><C-p>',
108 command = function() builtin.find_files(ivy) end,
114 keys = '<c-p><c-p>',
115 command = function () builtin.find_files( ivy ) end,
109116 }
111118 map.normal {
112119 description = 'Open search for all recent files...',
113120 category = 'search',
114 keys = '<C-p><C-o>',
115 command = function() builtin.oldfiles(ivy) end,
121 keys = '<c-p><c-o>',
122 command = function () builtin.oldfiles( ivy ) end,
116123 }
118125 map.normal {
119126 description = 'Open search for keymaps...',
120127 category = 'search',
121 keys = '<C-p><C-k>',
122 command = function() builtin.keymaps(dropdown) end,
128 keys = '<c-p><c-k>',
129 command = function () builtin.keymaps( dropdown ) end,
123130 }
125132 map.normal {
126133 description = 'Open search for symbols...',
127134 category = 'search',
128 keys = '<C-p><C-s>',
129 command = function() builtin.symbols(cursor) end,
135 keys = '<c-p><c-s>',
136 command = function () builtin.symbols( cursor ) end,
130137 }
132139 map.normal {
133140 description = 'Open search for all file contents...',
134141 category = 'search',
135 keys = '<C-p><C-g>',
136 command = function() builtin.live_grep(ivy) end,
142 keys = '<c-p><c-g>',
143 command = function () builtin.live_grep( ivy ) end,
137144 }
139146 map.normal {
140147 description = 'Open search for current buffer content...',
141148 category = 'search',
142 keys = '<C-p><C-b>',
143 command = function() builtin.current_buffer_fuzzy_find(ivy) end,
149 keys = '<c-p><c-b>',
150 command = function () builtin.current_buffer_fuzzy_find( ivy ) end,
144151 }
146153 map.normal {
147154 description = 'Open search for buffers...',
148155 category = 'search',
149 keys = '<C-e>',
150 command = function() builtin.buffers(cursor) end,
156 keys = '<c-e>',
157 command = function () builtin.buffers( cursor ) end,
151158 }
152159 end,

neovim/lua/bugabinga/plugins/whichkey.lua

Modified

+9 / −7 text lines

3939 -- use category as prefix?
4040 wk.register {
4141 ['<leader>'] = {
42 m = { name = 'mark' }, -- FIXME: this prefix does not show up. why?
43 l = { name = 'lsp' },
42 m = { name = 'mark', _ = 'which_key_ignore' },
43 h = { name = 'hunk', _ = 'which_key_ignore' },
44 l = { name = 'lsp', _ = 'which_key_ignore' },
4445 s = {
4546 name = 'swap',
47 _ = 'which_key_ignore',
4648 {
47 p = { name = 'parameter' },
49 p = { name = 'parameter', _ = 'which_key_ignore' },
4850 },
4951 },
50 g = { name = 'generate' },
5152 t = {
5253 name = 'toggle',
54 _ = 'which_key_ignore',
5355 {
54 o = { name = 'options' },
56 o = { name = 'options', _ = 'which_key_ignore' },
5557 }
5658 },
57 z = { name = 'lazy' },
58 [' '] = { name = 'fun' },
59 z = { name = 'lazy', _ = 'which_key_ignore' },
60 [' '] = { name = 'fun', _ = 'which_key_ignore' },
5961 }
6062 }
6163 end

neovim/lua/std/icon.lua

Modified

+2 / −0 text lines

6767 backspace_key = '',
6868 leader_key = '󱁐',
6969 start = '',
70 slant_left = '▟',
71 slant_right = '▙',

nushell/config.nu

Modified

+0 / −3 text lines

7474 rm: {
7575 always_trash: true
7676 }
77 cd: {
78 abbreviations: true
79 }
8077 color_config: $default_theme
8178 use_grid_icons: true
8279 footer_mode: "auto" # always, never, number_of_rows, auto

nushell/env.nu

Modified

+4 / −1 text lines

77$env.WORKSPACE = if $env.WIN32 { "W:/" } else { "~/Workspace" | path expand }
88$env.NOTES = if $env.WIN32 { "N:/" } else { "~/Notes" | path expand }
10$env.TERM = if ($env | get -i TERM_PROGRAM) == WezTerm { "wezterm" } else { "xterm-256color" }
10if ($env | get -i TERM_PROGRAM) == WezTerm {
11 $env.TERM = "wezterm"
12 $env.TERMCAP = ~./termcap/w/wezterm
13}
1215# theme for ls and other programs, that use LS_COLORS
1316$env.LS_COLORS = (try { vivid generate ayu | into string } catch {""})