diff --git a/bin/windows/create_completion_files.ps1 b/bin/windows/create_completion_files.ps1 index 27dc93e..61f9371 100644 --- a/bin/windows/create_completion_files.ps1 +++ b/bin/windows/create_completion_files.ps1 @@ -15,6 +15,7 @@ elan completions powershell > (Join-Path $script_location "elan_completion.ps1") wezterm shell-completion --shell power-shell > (Join-Path $script_location "wezterm_completion.ps1") chezmoi completion powershell > (Join-Path $script_location "chezmoi_completion.ps1") pip completion --powershell > (Join-Path $script_location "pip_completion.ps1") +rye self completion -s powershell > (Join-Path $script_location "rye_completion.ps1") # alias Set-Location $PSScriptRoot diff --git a/dotfiles/neovim/init.lua b/dotfiles/neovim/init.lua index 478d58e..8180992 100644 --- a/dotfiles/neovim/init.lua +++ b/dotfiles/neovim/init.lua @@ -222,11 +222,12 @@ vim.keymap.set('t', 'l', 'l', -- vim script func returns 1/0, while lua evals false only if gets false or nil -- so be sure to compare with 1/0 if vim.fn.has('win32') == 1 then - if vim.fn.executable('pwsh') == 1 then + -- this evaluation is so slow that I removed windows powershell support + -- if vim.fn.executable('pwsh') == 1 then vim.opt.shell = 'pwsh' - else - vim.opt.shell = 'powershell' - end + -- else + -- vim.opt.shell = 'powershell' + -- end vim.opt.shellcmdflag = '-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;' vim.opt.shellredir = '-RedirectStandardOutput %s -NoNewWindow -Wait' @@ -555,7 +556,8 @@ lspconfig.bashls.setup { } -- pwsh lspconfig.powershell_es.setup { - bundle_path = '~/scoop/apps/powershell-editorservice/current/PowerShellEditorServices' + bundle_path = '~/scoop/apps/powershell-editorservice/current', + capabilities = capabilities, } -- -- jetls -- lspconfig.jetls.setup {} diff --git a/dotfiles/neovim/lua/lualine_setup.lua b/dotfiles/neovim/lua/lualine_setup.lua index 6d5017a..7f412d4 100644 --- a/dotfiles/neovim/lua/lualine_setup.lua +++ b/dotfiles/neovim/lua/lualine_setup.lua @@ -1,3 +1,12 @@ +-- https://qiita.com/uhooi/items/99aeff822d4870a8e269 +local lsp_names = function () + local clients = {} + for _, client in ipairs(vim.lsp.get_active_clients({ bufnr = 0})) do + table.insert(clients, client.name) + end + return ' ' .. table.concat(clients, ', ') +end + require('lualine').setup { options = { icons_enabled = true, @@ -21,7 +30,7 @@ require('lualine').setup { lualine_a = {'mode'}, lualine_b = {'branch', 'diff', 'diagnostics'}, lualine_c = {'filename'}, - lualine_x = {'filetype'}, + lualine_x = {lsp_names, 'filetype'}, lualine_y = {'progress'}, lualine_z = {'location'} }, diff --git a/dotfiles/starship/starship.toml b/dotfiles/starship/starship.toml index ecaf046..e6de4cb 100644 --- a/dotfiles/starship/starship.toml +++ b/dotfiles/starship/starship.toml @@ -13,9 +13,10 @@ success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set disabled = true [battery] -full_symbol = " " -charging_symbol = "🔌 " +# full_symbol = "󰁹 " +charging_symbol = " " discharging_symbol = "⚡ " +empty_symbol = " " [[battery.display]] threshold = 10 style = "bold red" @@ -72,7 +73,7 @@ python_binary = ["./venv/bin/python", "python", "python3", "python2"] [rlang] format = "via [$symbol($version )]($style)" -symbol = "ﳒ" +symbol = "󰟔" [shell] powershell_indicator = ">_" diff --git a/dotfiles/startup_linux.jl b/dotfiles/startup_linux.jl index 95208ef..2b8a1aa 100644 --- a/dotfiles/startup_linux.jl +++ b/dotfiles/startup_linux.jl @@ -1,4 +1,28 @@ -using OhMyREPL +try + using OhMyREPL +catch e + @warn "Failed to load OhMyREPL" +end +try + using Revise +catch e + @warn "Failed to load Revise" +end +# try +# using InteractiveCodeSearch +# InteractiveCodeSearch.CONFIG.interactive_matcher = `fzf` +# catch e +# @warn "Failed to load InteractiveCodeSearch" +# end +try + using AbbreviatedStackTraces +catch e + @warn "Failed to load AbbreviatedStackTraces" +end + +#= + TerminalPager +=# # using JuliaSyntax # # if v"1.9" ≤ VERSION < v"1.10" diff --git a/dotfiles/startup_windows.jl b/dotfiles/startup_windows.jl index 5cb4982..e4c8fa5 100644 --- a/dotfiles/startup_windows.jl +++ b/dotfiles/startup_windows.jl @@ -2,3 +2,25 @@ # use python installed with scoop instead of conda in windows ENV["PYTHON"] = joinpath(homedir(), raw"scoop\apps\python\current\python.exe") +try + using OhMyREPL +catch e + @warn "Failed to load OhMyREPL" +end +try + using Revise +catch e + @warn "Failed to load Revise" +end +# try +# using InteractiveCodeSearch +# InteractiveCodeSearch.CONFIG.interactive_matcher = `fzf` +# catch e +# @warn "Failed to load InteractiveCodeSearch" +# end +# try +# using AbbreviatedStackTraces +# catch e +# @warn "Failed to load AbbreviatedStackTraces" +# end + diff --git a/dotfiles/wezterm/wezterm.lua b/dotfiles/wezterm/wezterm.lua index bfc0373..88aac00 100644 --- a/dotfiles/wezterm/wezterm.lua +++ b/dotfiles/wezterm/wezterm.lua @@ -51,9 +51,13 @@ return { -- font = wezterm.font 'FirgeNerd Console' font = wezterm.font_with_fallback { { - family = 'JuliaMono', + family = 'JuiseeHW Nerd Font', + weight = 'Bold', harfbuzz_features = { 'calt=0', -- disables ligature + 'zero=1', + 'ss08=0', + 'ss20=0', }, }, { family = 'FirgeNerd Console', assume_emoji_presentation = true }, -- for japanese diff --git a/extra_configs/windows_terminal.md b/extra_configs/windows_terminal.md new file mode 100644 index 0000000..87317ff --- /dev/null +++ b/extra_configs/windows_terminal.md @@ -0,0 +1,59 @@ +# Windows Terminal Settings + +## Quake Mode +Alomost no animation (duration = 1ms). +Use with Fancy Zones in PowerToys to enable fullscreen dropdown (or pop up) terminal. +```json +{ + "actions": + [ + { + "command": + { + "action": "globalSummon", + "desktop": "toCurrent", + "dropdownDuration": 1, + "monitor": "toMouse", + "name": "_quake", + "toggleVisibility": true + }, + "keys": "ctrl+f12" + }, + ] +} +``` + +## Font +Use *Juisee HW* with Nerd Fonts. + +Below is settings for stylistic sets. +Insert this to the "font". +```json +{ + "profiles": + { + "list": + { + [ + "font": + { + "face": "JuiseeHW Nerd Font", + "size": 11.0, + "features": { + "calt": 0, // No contextural alternates + "zero": 1, // slashed zero + "ss08": 0, + "ss20": 0 + } + }, + ] + } + } +} +``` + +### references +- https://juliamono.netlify.app/#stylistic_sets +- https://github.com/tonsky/FiraCode/wiki/How-to-enable-stylistic-sets +- https://learn.microsoft.com/en-us/windows/terminal/customize-settings/profile-appearance#font +