dotfiles bugabingas dorkfiles
owned by bugabinga
README Source History Refs Compare Notes Search neovim: new user command LspInfo (basic only)
50603b3db44ffaec3754ccb4947f9498ff6e76f5
Oliver Krylow <o.krylow@isp-insoft.de > · 26 Jul 2023
unsigned
Browse files Compare with HEAD
Changed files (4) neovim/lua/bugabinga/lsp/clients/lua.lua Modified 1 1 local project
= require 'std.project' 31 31 name =
'LuaLS(nvim)' ,
neovim/lua/bugabinga/lsp/init.lua Modified 8 8 local map
= require 'std.keymap' 9 9 local auto
= require 'std.auto' 10 + local deep_concat
= require 'std.table.deep_concat' 12 + local lsp_client_configs
= require 'bugabinga.lsp.clients' 44 - local lsp_client_configs
= require 'bugabinga.lsp.clients' 46 48 local potential_client_configs
= vim.iter(lsp_client_configs)
47 49 :map(
function (config)
107 109 before_init
= config.before_init,
109 111 on_exit = function (code, signal, client_id) vim.print(
"LSP CLIENT EXIT" , code, signal, client_id)
end ,
110 - on_attach = function (client, bufnr) vim.print(
"LSP CLIENT ATTACH" , client, bufnr)
end ,
112 + on_attach = function (client, bufnr) vim.print(
"LSP CLIENT ATTACH" , client.data.client_id, bufnr)
end ,
112 114 flags
= {
allow_incremental_sync =
true ,
debounce_text_changes =
50 ,
exit_timeout =
200 },
113 115 root_dir
= config.root_dir(buffer_path),
155 + local lsp_info = function (command)
156 + local all_or_current
= command.args
and command.args
== 'all' and {}
or {
bufnr =
0 }
157 + local active_clients
= vim.lsp.get_active_clients(all_or_current)
176 + local infos
= vim.iter(active_clients)
177 + :map(
function (client)
178 + local name
= client.name
179 + local config
= vim.iter(lsp_client_configs):find(
function (config)
return config.name
== name
end )
180 + assert (config, (
'How did we not find a config for %s ?!?!' ):format(name))
185 + cmd = { client.config.cmd, client.config.cmd_cwd,
'TODO:pid' ,
'TODO:cpu' ,
'TODO:mem' },
186 + workspace_folders = vim.iter(client.workspace_folders):map(
function (w)
return vim.fs.normalize(w.name)
end ):totable(),
187 + filetypes = config.filetypes,
188 + single_file_support = config.single_file_support,
189 + workspaces = config.workspaces,
196 + vim.print(deep_concat(infos))
199 + vim.api.nvim_create_user_command (
'LspInfo' ,
203 + complete =
function ()
return {
"all" }
end ,
204 + desc =
'Shows basic information about running LSP clients.' ,
154 207 return setmetatable (_ ,{ })
neovim/lua/bugabinga/nugu/init.lua Modified 73 73 NonText {
fg = ui_unfocus },
75 75 Pmenu { NormalFloat },
76 - PmenuSel {
fg = ui_focus.readable(),
sp = ui_focus.readable(),
bg = ui_unfocus,
gui =
'underline' },
76 + PmenuSel {
fg = ui_focus,
sp = ui_focus.readable(),
bg = ui_unfocus,
gui =
'underline' },
77 77 PmenuSbar {
bg = ui_unfocus },
78 78 PmenuThumb {
bg = ui_minor },
79 79 Question {
fg = ui_important_global,
gui =
'bold' },
wezterm/wezterm.lua Modified 11 11 local enable_wayland
= false 12 12 local window_decorations
= 'RESIZE' 13 13 local font_size
= 11.0 14 - local font
= wez.font
'Blex Mono Nerd Font' 20 - family =
'VictorMono Nerd Font' ,
29 - family =
'VictorMono Nerd Font' ,
30 - weight =
'DemiBold' ,
36 - intensity =
'Normal' ,
38 - family =
'VictorMono Nerd Font' ,
14 + local normal_font_family
= 'Blex Mono Nerd Font' 15 + local italic_font_family
= 'Victor Mono Nerd Font' 44 16 if hostname
== 'x230' then 46 18 enable_wayland
= true 47 19 elseif hostname
== 'pop-os' then 49 21 elseif hostname
== 'PC-00625' then 50 - font
= wez.font
'BlexMono Nerd Font' 22 + normal_font_family
= 'BlexMono Nerd Font' 23 + italic_font_family
= 'VictorMono Nerd Font' 31 + font = wez.font {
family = normal_font_family,
weight =
'Light' ,
style =
'Normal' }
34 + intensity =
'Normal' ,
35 + font = wez.font {
family = normal_font_family,
weight =
'Book' ,
style =
'Normal' }
39 + font = wez.font {
family = normal_font_family,
weight =
'Medium' ,
style =
'Normal' }
45 + font = wez.font {
family = italic_font_family,
weight =
'DemiBold' ,
style =
'Italic' },
48 + intensity =
'Normal' ,
50 + font = wez.font {
family = italic_font_family,
weight =
'Regular' ,
style =
'Italic' },
55 + font = wez.font {
family = italic_font_family,
weight =
'Bold' ,
style =
'Italic' },
59 64 font_rules = font_rules,
60 65 font_size = font_size,
66 + freetype_load_target =
'Light' ,
67 + freetype_render_target =
'HorizontalLcd' ,
61 68 underline_position =
"-2pt" ,
62 69 warn_about_missing_glyphs =
false ,
63 70 color_scheme = dark_mode,