# Suppose you are at path xxx
mkdir tmp
cp ~/Library/Application\ Support/Sublime\ Text/Installed\ Packages/LSP-typescript.sublime-package .
cd tmp # now at: xxx/tmp
unzip ../LSP-typescript.sublime-package # extracts to the current dir
cd typescript-language-server # now at: xxx/tmp/typescript-language-server
๐
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%YAML 1.2 | |
--- | |
# http://www.sublimetext.com/docs/syntax.html | |
name: Property List (Old-Style) | |
file_extensions: | |
- plist | |
# from: https://github.com/textmate/property-list.tmbundle/blob/master/Syntaxes/Property%20List%20(Old-Style).tmLanguage | |
# warning: pop pattern contains \G, this will not work as expected if it's intended to refer to the begin regex: (?!\G) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::task::{Poll, Context}; | |
use std::future::Future; | |
use std::pin::Pin; | |
use tokio::io::{Error, Interest, unix::AsyncFd}; | |
struct PollTarget { | |
inner: AsyncFd<i32>, | |
} | |
impl PollTarget { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
PATH_TO_FWTOOL=/home/qbane/system-apps/framework-system/target/debug/framework_tool | |
if [ $# -eq 0 ]; then | |
exec $PATH_TO_FWTOOL --help | |
fi | |
# if this does not work (like using a kernel before 6.12), you might need "--driver=portio" extra arg | |
exec sudo $PATH_TO_FWTOOL "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name yorkxin | |
// @version 1 | |
// @match https://blog.yorkxin.org/* | |
// @grant none | |
// ==/UserScript== | |
const links = Array.from(document.querySelectorAll('a[href]')) | |
let cnt = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { GreaterThanOrEqual, Merge } from 'type-fest' | |
import { BuildTuple, Whitespace } from 'type-fest/source/internal' | |
// TODO: trim comments | |
type TrimWS<S extends string> = | |
S extends `${Whitespace}${infer R}` ? ( | |
R extends `${Whitespace}${infer RR}` ? ( | |
RR extends `${Whitespace}${infer RRR}` ? ( | |
RRR extends `${Whitespace}${infer RRRR}` ? TrimWS<RRRR> : RRR | |
) : RR) : R) : S |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { blockFunctionNameSet } from './names' | |
interface InputConfig { | |
debug?: boolean | |
locations?: boolean | |
allowServiceRules?: boolean | |
} | |
type IVLanguageVersion = '1.0' | '2.0' | '2.1' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
StateField, | |
StateEffect, | |
EditorSelection, | |
StateEffectType, | |
} from '@codemirror/state' | |
import { EditorView, ViewPlugin } from '@codemirror/view' | |
/** @import { Text, Line } from '@codemirror/state' */ | |
/** @import { PluginValue, BlockInfo } from '@codemirror/view' */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { minimalSetup } from 'codemirror' | |
import { EditorState } from '@codemirror/state' | |
import { EditorView, keymap } from '@codemirror/view' | |
import { insertNewlineAndIndent, insertBlankLine } from '@codemirror/commands' | |
function removeNewlineCommands(exts) { | |
const newlineCommands = [insertNewlineAndIndent, insertBlankLine] | |
return exts.map(ext => { | |
if (ext?.facet == keymap) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { basicSetup, minimalSetup } from 'codemirror' | |
import { Prec } from '@codemirror/state' | |
import { EditorView, keymap, placeholder } from '@codemirror/view' | |
import { search, findNext, findPrevious } from '@codemirror/search' | |
const SearchPanel = (() => { | |
const searchConfigFacet = search({})[0].facet |
NewerOlder