Merge branch 'main' into orgmode

This commit is contained in:
qwjyh 2023-11-17 09:03:00 +09:00
commit d4d30aa239
8 changed files with 133 additions and 11 deletions

View file

@ -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

View file

@ -222,11 +222,12 @@ vim.keymap.set('t', '<C-w>l', '<C-\\><C-N><C-w>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 {}

View file

@ -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'}
},

View file

@ -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 = ">_"

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -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