From 2dfbb5b499cd809f936da74b7c9d9ee6a8809808 Mon Sep 17 00:00:00 2001 From: navewindre Date: Sat, 23 Nov 2024 20:40:33 +0100 Subject: sda --- nowplaying/playing.js | 19 +++++-------------- vimrc | 21 ++++++++++++++++++--- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/nowplaying/playing.js b/nowplaying/playing.js index cef25fb..e7a50b9 100755 --- a/nowplaying/playing.js +++ b/nowplaying/playing.js @@ -2,13 +2,8 @@ const WebSocket = require( "ws" ); -process.on( "uncaughtException", () => { - console.log(); -} ); - -process.on( "unhandledRejection", () => { - console.log(); -} ); +process.on( "uncaughtException", () => { console.log(); } ); +process.on( "unhandledRejection", () => { console.log(); } ); let ws = null; let idc = 1; @@ -46,10 +41,8 @@ const setupws = () => { ret += ' - '; } - const homedir = require( "os" ).homedir(); - if( title.startsWith( homedir ) ) { - const path = title.substring( homedir.length + 1 ); - const file = path.split( "/" ).pop(); + if( title.startsWith( '/' ) ) { + const file = title.split( "/" ).pop(); ret += file; } else ret += title; @@ -73,6 +66,4 @@ const sendreq = () => { ws.send( JSON.stringify( obj ) ); } -try { - setupws(); -} catch ( e ) {} +setupws(); diff --git a/vimrc b/vimrc index c41440d..5dadd8b 100644 --- a/vimrc +++ b/vimrc @@ -36,7 +36,7 @@ lua < 10 + let l:start = l:cur_line - 10 + endif + + let l:end = l:cur_line + 10 + if l:end > l:last_line + let l:end = l:last_line + endif + + for l:lnum in range(l:start, l:end) if l:lnum != l:cur_line let l:distance = abs(l:cur_line - l:lnum) if l:distance > 0 && l:distance <= 9 @@ -671,6 +684,8 @@ hi PmenuSel guibg=#ffffff guifg=#202020 hi Variable guifg=#40FF40 ctermfg=Green hi @variable guifg=#40FF40 ctermfg=Green hi Identifier guifg=#27ea91 +hi def link @lsp.typemod.variable.defaultLibrary.javascriptreact Special +hi def link @lsp.typemod.variable.defaultLibrary.typescriptreact Special hi def link @lsp.typemod.variable.defaultLibrary.javascript Special hi def link @lsp.typemod.variable.defaultLibrary.typescript Special hi def link @punctuation.special.javascript Delimiter -- cgit v1.2.3