Browse Source

Kitty update. nimlsp & kak-lsp working. new nim flags. minor script fixes.

master
SolitudeSF 3 months ago
parent
commit
85dc6bf126
No known key found for this signature in database
6 changed files with 21 additions and 15 deletions
  1. 1
    1
      bin/mpw-get
  2. 1
    2
      bin/screenshot
  3. 2
    1
      kak/kakrc
  4. 7
    0
      kitty/kitty.conf
  5. 0
    1
      mpd
  6. 10
    10
      nim.nim

+ 1
- 1
bin/mpw-get View File

@@ -10,4 +10,4 @@ if (eq 0 (count $args)) {
} else {
t=$args[0]
}
mpw -t x -M (gpg2 -d -q ~/sns/password.gpg) $t 2>/dev/null | xclip -sel c -r
mpw -t x -M (gpg2 -d -q ~/sns/password.gpg) $t 2>/dev/null | xclip -sel c -r -l 1

+ 1
- 2
bin/screenshot View File

@@ -1,8 +1,7 @@
#!/bin/sh
dir=$(xdg-user-dir PICTURES)/screen
[ -d "$dir" ] || mkdir -p "$dir"
file=$(date +"%Y-%m-%d_%H:%M:%S").png
path=$dir/$file
path=$dir/$(date "+%Y-%m-%d_%H:%M:%S").png
if maim -u -s "$path"; then
notify-send --icon "$path" "Screenshot saved" "$path"
xclip -sel c -t image/png "$path"

+ 2
- 1
kak/kakrc View File

@@ -220,9 +220,10 @@ hook global WinSetOption filetype=nim %{
set buffer gdb_program 'nim-gdb'
set buffer formatcmd "nimpretty ${kak_buffile}"
set buffer makecmd 'nimble build'
no-tabs 2
lsp-engage
# set buffer lintcmd "sh -c 'cp -f $0 $0.nim;nim --stdout --colors:off --hints:off --path:$(dirname ${kak_buffile}) check $0 | sed \"s/(/:/;s/, /:/;s/)/:/\" | sed \":a;N;/\n[buf.nim]/!s/\n//;ta;P;D\"'"
# set buffer lintcmd "sh -c 'nim --stdout --hints:off check $0 | sed \'s/(/:/;s/, /:/;s/)/:/\''"
# lint-on-write
# format-on-write
no-tabs 2
}

+ 7
- 0
kitty/kitty.conf View File

@@ -20,6 +20,7 @@ scrollback_pager less --chop-long-lines -R +INPUT_LINE_NUMBER
wheel_scroll_multiplier 5.0
click_interval 0.5

strip_trailing_spaces always
select_by_word_characters :@-./_~?&=%+#

shell elvish
@@ -63,12 +64,18 @@ window_padding_width 0

inactive_text_alpha 1.0

resize_debounce_time 0.1
resize_draw_strategy size

tab_bar_edge bottom
tab_bar_margin_width 0
# fade | separator
tab_bar_style separator
tab_bar_min_tabs 2
tab_switch_strategy previous
tab_fade 0.15 0.3 0.45 0.8
tab_separator " ┇"
tab_title_template {title}

active_tab_font_style bold-italic
inactive_tab_font_style normal

+ 0
- 1
mpd View File

@@ -13,7 +13,6 @@ bind_to_address "127.0.0.1"
bind_to_address "~/.local/share/mpd/socket"
port "6600"
auto_update "yes"
#auto_update_depth "3"
replaygain "album"
replaygain_preamp "0"
#volume_normalization "no"

+ 10
- 10
nim.nim View File

@@ -2,8 +2,6 @@ from macros import error

type Compiler = enum gcc = "gcc", clang = "clang"

const is199 = (NimMajor, NimMinor, NimPatch) >= (0, 19, 9)

proc setCompiler(s: string, compiler = gcc, cpp = false) =
let c = findExe s
let cpp = (if cpp: ".cpp" else: "")
@@ -34,16 +32,18 @@ when defined(musl):
setCompiler "x86_64-linux-musl-gcc"
switch "passL", "-static"

when is199:
switch "styleCheck", "hint"

when defined(release):
when is199:
switch "nimcache", "/tmp/nim/" & projectName() & "_r"
when defined(release) or defined(danger):
switch "passC", "-flto"
switch "passL", "-s"
elif is199:
switch "nimcache", "/tmp/nim/" & projectName() & "_d"

when (NimMajor, NimMinor, NimPatch) >= (0, 19, 9):
switch "styleCheck", "hint"
when defined(release):
switch "nimcache", "/tmp/nim/" & projectName() & "_r"
when defined(danger):
switch "nimcache", "/tmp/nim/" & projectName() & "_d"
else:
switch "nimcache", "/tmp/nim/" & projectName()

when defined(hotcodereloading):
switch "nimcache", "nimcache"

Loading…
Cancel
Save