dotfiles
bugabingas dorkfiles
owned by bugabinga
neovim: delete unused plugin
neovim: modifies MiniPairs to only insert some pairs, when at the end of
line
ea61ea0d1326a7a6875f4fbc5577945bbe0f1ef4
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
Browse filesCompare with HEAD
Changed files (6)
45 45 require 'bugabinga.save_actions' 46 46 require 'bugabinga.lsp' 47 47 require 'bugabinga.java' 48 -require 'bugabinga.in_and_out' 49 48 require 'bugabinga.mkdir' 50 49 require 'bugabinga.diagnostic' neovim/lua/bugabinga/in_and_out.lua
Deleteddeleted file mode 100644 2 -local map
= require 'std.map' 4 -local function escape_lua_pattern( s )
19 - return s:gsub(
'.', matches )
22 -local targets
= {
'"',
"'",
'(',
')',
'{',
'}',
'[',
']',
'`' }
24 -local in_and_out = function ()
25 - local current_row, current_col
= unpack( vim.api.nvim_win_get_cursor(
0 ) )
26 - local lines_in_buf
= vim.api.nvim_buf_get_lines(
0, current_row
- 1,
-1,
false )
28 - local target_row
= 0 29 - local target_col
= nil 30 - for i, line
in ipairs( lines_in_buf )
do 31 - for _, char
in ipairs( targets )
do 32 - local found_col
= string.
find( line, escape_lua_pattern( char ), current_col
+ 1 )
33 - if found_col
and (
not target_col
or found_col
< target_col)
then 35 - target_col
= found_col
+ vim.fn.strlen( char )
- 1 39 - target_row
= current_row
+ i
- 1 45 - vim.api.nvim_win_set_cursor(
0, { target_row, target_col } )
50 - description =
'Moves in or out of balanced tokens',
51 - category =
'editing',
53 - command = in_and_out,
neovim/lua/bugabinga/lsp.lua
Modified107 107 local lspconfig
= puk
'lspconfig' 108 -for server, config
in pairs(language_servers)
do 108 +for server, config
in pairs( language_servers )
do 109 109 local capabilities
= vim.lsp.protocol.make_client_capabilities()
110 110 capabilities.textDocument.semanticTokens.multilineTokenSupport
= true 111 111 config.capabilities
= capabilites
116 - lspconfig[server].setup(config)
116 + lspconfig[server].setup( config )
119 -local lsp_attach = function(args)
119 +local lsp_attach = function ( args )
120 120 local bufnr
= args.buf
121 121 local client_id
= args.data.client_id
122 - local client
= vim.lsp.get_client_by_id(client_id)
122 + local client
= vim.lsp.get_client_by_id( client_id )
123 123 if not client
then return end 125 - vim.lsp.completion.enable(
true, client_id, bufnr)
125 + vim.lsp.completion.enable(
true, client_id, bufnr )
198 198 description
= 'type hierarchy (subtypes)',
199 199 category
= 'lsp',
201 - command = function() vim.lsp.buf.typehierarchy
'subtypes' end,
201 + command = function () vim.lsp.buf.typehierarchy
'subtypes' end,
204 204 description =
'type hierarchy (supertypes)',
205 205 category =
'lsp',
207 - command =
function() vim.lsp.buf.typehierarchy
'supertypes' end,
207 + command =
function () vim.lsp.buf.typehierarchy
'supertypes' end,
220 220 category
= 'lsp',
222 222 keys
= '<leader>ti',
223 - command = function()
224 - vim.lsp.inlay_hint.enable(
not vim.lsp.inlay_hint.is_enabled())
223 + command = function ()
224 + vim.lsp.inlay_hint.enable(
not vim.lsp.inlay_hint.is_enabled() )
260 260 local completion_kinds
= vim.lsp.protocol.CompletionItemKind
261 -for i, kind
in ipairs(completion_kinds)
do 261 +for i, kind
in ipairs( completion_kinds )
do 262 262 completion_kinds[i]
= completion_icons[kind]
or kind
neovim/lua/bugabinga/pairs.lua
Modified1 1 local puk
= require 'std.puk' 3 -puk.defer
'mini.pairs' (
function(pairs)
3 +puk.defer
'mini.pairs' (
function ( pairs )
6 + [
'('] = {
action =
'open',
pair =
'()',
neigh_pattern =
'.\n' },
7 + [
'['] = {
action =
'open',
pair =
'[]',
neigh_pattern =
'.\n' },
8 + [
'{'] = {
action =
'open',
pair =
'{}',
neigh_pattern =
'.\n' },
9 + [
'<'] = {
action =
'open',
pair =
'<>',
neigh_pattern =
'.\n' },
11 + [
')'] = {
action =
'close',
pair =
'()',
neigh_pattern =
'[^\\].' },
12 + [
']'] = {
action =
'close',
pair =
'[]',
neigh_pattern =
'[^\\].' },
13 + [
'}'] = {
action =
'close',
pair =
'{}',
neigh_pattern =
'[^\\].' },
14 + [
'>'] = {
action =
'close',
pair =
'<>',
neigh_pattern =
'[^\\].' },
neovim/lua/bugabinga/surround.lua
Modified12 12 normal_line
= 'sA',
14 15 normal_cur_line
= 'sC',
neovim/lua/std/ignored.lua
Modified