From 8d55de5053ce6de0cb21fa693016d28cc827226f Mon Sep 17 00:00:00 2001 From: qwjyh Date: Tue, 31 Oct 2023 18:00:11 +0900 Subject: [PATCH 01/10] update startup.jl for linux --- dotfiles/startup_linux.jl | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) 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" From 2464e0976354440b5ec65174914aa133fcbd4652 Mon Sep 17 00:00:00 2001 From: qwjyh Date: Tue, 31 Oct 2023 19:15:28 +0900 Subject: [PATCH 02/10] julia: startup for windows --- dotfiles/startup_windows.jl | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/dotfiles/startup_windows.jl b/dotfiles/startup_windows.jl index 5cb4982..1381b51 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 + From 63c3a122dc7385d5ee81974d67490716787f4c73 Mon Sep 17 00:00:00 2001 From: qwjyh Date: Tue, 31 Oct 2023 20:08:01 +0900 Subject: [PATCH 03/10] fix: nvim: remove pwsh detection --- dotfiles/neovim/init.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dotfiles/neovim/init.lua b/dotfiles/neovim/init.lua index a6a46b1..423037f 100644 --- a/dotfiles/neovim/init.lua +++ b/dotfiles/neovim/init.lua @@ -195,11 +195,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' From 02b2b52b03d123c0f01855b539cedd4fdc6504da Mon Sep 17 00:00:00 2001 From: qwjyh Date: Thu, 2 Nov 2023 20:32:19 +0900 Subject: [PATCH 04/10] julia: disable stacked trace for windows --- dotfiles/startup_windows.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dotfiles/startup_windows.jl b/dotfiles/startup_windows.jl index 1381b51..e4c8fa5 100644 --- a/dotfiles/startup_windows.jl +++ b/dotfiles/startup_windows.jl @@ -18,9 +18,9 @@ end # catch e # @warn "Failed to load InteractiveCodeSearch" # end -try - using AbbreviatedStackTraces -catch e - @warn "Failed to load AbbreviatedStackTraces" -end +# try +# using AbbreviatedStackTraces +# catch e +# @warn "Failed to load AbbreviatedStackTraces" +# end From 56a1233b716cb3c99c1517c62ef03b05c556ede7 Mon Sep 17 00:00:00 2001 From: qwjyh Date: Fri, 3 Nov 2023 23:03:40 +0900 Subject: [PATCH 05/10] starship: fix: removed obsolete nerd icons --- dotfiles/starship/starship.toml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 = ">_" From a23422d1e95d5250579f10a4097352648fbf4a37 Mon Sep 17 00:00:00 2001 From: qwjyh Date: Sat, 4 Nov 2023 00:20:07 +0900 Subject: [PATCH 06/10] new: wt: notes on windows terminal settings --- extra_configs/windows_terminal.md | 59 +++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 extra_configs/windows_terminal.md 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 + From 7ce6a4cf2681180f8e4c3efd6e6a22f5c1eb32a7 Mon Sep 17 00:00:00 2001 From: qwjyh Date: Sat, 4 Nov 2023 16:48:10 +0900 Subject: [PATCH 07/10] update: nvim: display LSP status in status bar --- dotfiles/neovim/lua/lualine_setup.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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'} }, From 5f6bf46fec03d0b925f6a7c48fe8dab5d54bbfaa Mon Sep 17 00:00:00 2001 From: qwjyh Date: Sat, 4 Nov 2023 21:09:02 +0900 Subject: [PATCH 08/10] update: wezterm: use JuiseeHW Nerd Font (Bold) --- dotfiles/wezterm/wezterm.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 From 60ca8a218cfbfd6be2522fa7ea0daefffca5c563 Mon Sep 17 00:00:00 2001 From: qwjyh Date: Tue, 14 Nov 2023 18:34:21 +0900 Subject: [PATCH 09/10] pwsh: add rye completion --- bin/windows/create_completion_files.ps1 | 1 + 1 file changed, 1 insertion(+) 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 From 1fb014714a45dfd96c3577b342fa8e088f07cd35 Mon Sep 17 00:00:00 2001 From: qwjyh Date: Wed, 15 Nov 2023 22:31:11 +0900 Subject: [PATCH 10/10] nvim: fix config of pwsh-es --- dotfiles/neovim/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dotfiles/neovim/init.lua b/dotfiles/neovim/init.lua index 423037f..6a7b67e 100644 --- a/dotfiles/neovim/init.lua +++ b/dotfiles/neovim/init.lua @@ -529,7 +529,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 {}