
#GitHub
https://gitmoji.dev/
追加系
:tada:
🎉 初回コミットや、フレームワーク変更による大幅なアップデートで使用。
:zap:
⚡️ コンポーネントの追加時に使用。
やらなきゃいけない事
Svelteをv4からv5にしたら発生したエラー(未解決)
やりたいこと
#Neovim #coc.nvim
https://scoop.sh でGoをインストール
scoop install main/go
coc.nvimで coc-go
をインストール
:CocInstall coc-go
SvelteKitプロジェクト作成
bun create svelte@latest
Firebase CLIのインストール
グローバルにインストールする。プラットフォームごとにインストールするか、npmでグローバルインストールするか。
今回は、npmでグローバルインストールした。
#keyball
keyballに関する情報を雑にまとめる
購入場所
keyball61-Shirogane Lab
¥25,800
#Emacs #Manjaro
wayland環境なので emacs-wayland をインストール
まず読む
2020年代のEmacs入門
#Rust
The wasm-bindgen Guide
docs
解説記事
【正規表現】入門
正規表現の基礎まとめ
#Rust
Regex
#Rust
似ているようで違う println!
と format!
の違い
println!
https://doc.rust-lang.org/std/macro.println.html
fn hello_name_println(name: &str) {
#Tauri
https://discord.com/channels/616186924390023171/1261479055019216999
https://github.com/tauri-apps/tauri-docs/blob/v2/src/content/docs/plugin/file-system.mdx
https://github.com/tauri-apps/tauri-docs/tree/v2/src/content/docs/plugin
#Tauri
https://github.com/tauri-apps/tauri/issues/10192#issuecomment-2209343184
$ bun run tauri dev
bun run tauri dev
Running BeforeDevCommand (`bun run dev`)
#Tauri
v1の FileEntry
https://tauri.app/v1/api/js/fs#fileentry
v2には存在しないのでそれっぽいのは...
https://v2.tauri.app/reference/javascript/fs/#direntry
#Tauri
v1からv2へ移行する際に下記のエラーが発生
Error: The following dependencies are imported but could not be resolved:
@tauri-apps/api/fs (imported by /mnt/sabrent/dev/sveltekit/faira/src/lib/components/CurrentPath.svelte?id=0)
#Tauri
https://github.com/tauri-apps/tauri/issues/10185
error: failed to run custom build command for `faira v0.1.0 (/mnt/sabrent/dev/sveltekit/faira/src-tauri)`
Caused by:
process didn't exit successfully: `/mnt/sabrent/dev/sveltekit/faira/src-tauri/target/debug/build/faira-d783581594c54aa9/build-script-build` (exit status: 1)
#Tauri
#Tauri
https://v2.tauri.app/start/migrate/from-tauri-1/
v1からv2にマイグレーションする際の全体的な方法
https://v2.tauri.app/reference/config/
tauri.conf.json
の設定項目
#ArchLinux #Manjaro
https://wiki.archlinux.jp/index.php/PKGBUILD
https://wiki.archlinux.jp/index.php/パッケージの作成#.E3.82.A4.E3.83.B3.E3.82.B9.E3.83.88.E3.83.BC.E3.83.AB.E3.81.AE.E3.83.80.E3.82.A6.E3.83.B3.E3.83.AD.E3.83.BC.E3.83.89.E3.81.A8.E3.83.86.E3.82.B9.E3.83.88
#Tauri
https://github.com/tauri-apps/tauri/discussions/8850
tauri.conf.json
の設定次第
"tauri": {
"allowlist": {
#Svelte
このコードだと entryPaths
をconsole.logで確認出来るが ul
タグで表示出来なかった。
let entryPaths: string[] = [];
async function processEntries(entries: FileEntry[]) {
for (const entry of entries) {
Vimに関する情報
Rust言語に関するあれこれ
#Vite #SvelteKit
5173ポートを使用しているプロセスIDを特定する
lsof -i:5173
出力結果はこちら
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
#Bun #SvelteKit
$ bun pm untrusted
bun pm untrusted v1.1.18 (5a0b9352)
./node_modules/svelte-preprocess @5.1.4
» postinstall: echo \"svelte-preprocess Don't forget to install the preprocessors packages that will be used: sass, stylus, less, postcss & postcss-load-config, coffeescript, pug, etc...\"
#SKK #Inkdrop #Manjaro
AURからインストール
https://aur.archlinux.org/packages/inkdrop
snapからインストールした場合、/usr/share/applications/inkdrop.desktop
が存在しないためwaylandのime設定を有効に出来ない。
設定を変更する
#Manjaro #MIcrosoftEdge
https://aur.archlinux.org/packages/microsoft-edge-stable-bin
fcitx5-skkを動かしたい場合は下記を実施
ManjaroにインストールしたMicrosoft Edgeでfcitx5-skkを動かすためにする設定
#Manjaro #MicrosoftEdge #SKK
Arch + KDE 6 (Wayland) で日本語入力環境を少しでもまともにする
https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland#KDE_Plasma
sudo nvim microsoft-edge.desktop
#Tauri #Manjaro
Manjaro環境でTauriのプロジェクトを pnpm tauri dev
するとタイトルのビルドエラー発生。
The following warnings were emitted during compilation:
warning: javascriptcore-rs-sys@0.4.0:
error: failed to run custom build command for `javascriptcore-rs-sys v0.4.0`
#Tauri #coc.nvim
https://tauri.app/v1/guides/getting-started/setup/sveltekit に従ってプロジェクトを作成すると、SvelteKitプロジェクト内で pnpm tauri init
を実行するため、src-tauri
ディレクトリがSvelteKit内に生成される。
https://github.com/fannheyward/coc-rust-analyzer の rust-analyzer.linkedProjects
を確認する。
#Neovim #Deno #coc.nvim
coc-deno を CocInstall
する。
:CocCommand deno.initializeWorkspace
を行う。
{
"deno.enable": true,
#Deno
https://jsr.io/@std/cli/doc/parse-args/~/parseArgs
#Deno #coc.nvim
deno cacheコマンド
https://docs.deno.com/runtime/manual/getting_started/command_line_interface#type-checking-flags
ファイルをキャッシュする。
deno cache main.ts
#Deno #JSR
$ deno cache --help
Cache and compile remote dependencies recursively.
Download and compile a module with all of its static dependencies and save
them in the local cache, without running any code:
#Deno #JSR
https://docs.deno.com/runtime/manual/tools/script_installer
deno install --global jsr:@daiki48/hello-cli-from-jsr
jsr:
を付ける。
✅ Successfully installed hello-cli-from-jsr
#Deno #JSR
すでにJSRでスコープを作成済み https://jsr.io/@daiki48
プロジェクトをローカルに作る
deno init
Neovimの設定をする。
#Rust
https://doc.rust-lang.org/std/fs/struct.DirEntry.html
ReadDir
イテレータが返すエントリ
ファイルシステム上のディレクトリ内のエントリを表す
各エントリをメソッドで知らべることで、フルパスやプラットフォームごとの拡張特性によるその他のメタデータを確認出来る
#Rust
cargo login
発行済みのトークンを貼り付ける
cargo publish
#Rust
Vec
ヒープ領域に格納
動的配列(ベクトル)
サイズが可変
#Rust
&str
文字列スライスと呼ばれる
不変でサイズ固定
文字列リテラルや他の文字列の一部を参照する際に使われる
#Rust
https://doc.rust-lang.org/std/env/fn.current_dir.html
この関数は現在、Unixではgetcwd関数、WindowsではGetCurrentDirectoryW関数に相当。
現在の作業ディレクトリを PathBuf
で返す。
use std::env;
#Firebase
https://qiita.com/KosukeSaigusa/items/18217958c581eac9b245
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
#Vim #Neovim #coc.nvim #Rust
https://rust-analyzer.github.io/manual.html#coc-rust-analyzer
https://github.com/fannheyward/coc-rust-analyzer
coc-rust-analyzerをインストール
CocInstall coc-rust-analyzer
コマンドを実施。
#Svelte
このエラーが発生した。
https://github.com/sveltejs/svelte/issues/9520
$effect(async() => {
...
#jsDoc
jsdoc src
There are no input files to process.
#Git
git branch
git branch <new-branch>
git checkout <new-branch>
git checkout -b <new-branch>
#Vim #Neovim
基本
:s
が基本的な形 :%s
で現在開いているファイル内で置換するという意味
ファイル内の文字列を一括置換
:%s/hoge/bar/g
#CSS
font-family: 'BIZ UDPGothic', 'ヒラギノ角ゴ Pro W3', 'Hiragino Kaku Gothic Pro', 'メイリオ', Meiryo, Osaka, 'MS Pゴシック', 'MS PGothic', sans-serif;
#JavaScript
try catch
エラーの可能性がある処理で使用。
エラーをキャッチして適切に処理出来る。
例 (予期しないエラーや例外などで使用する)
#Deno #Error #coc.nvim
https://github.com/denoland/vscode_deno/issues/787#issue-1530461284
import { DOMParser } from '@b-fuze/deno-dom'; // Relative import path "@b-fuze/deno-dom" not prefixed with / or ./ or ../ (deno import-prefix-missing)
#Svelte #SvelteKit #環境変数
それぞれの特徴
$env/dynamic/private
サーバーサイドでのみ使用可能。
config.kit.env.publicPrefix
ではなく config.kit.env.privatePrefix
で始まる変数のみを含む。
#OGP #Svelte
#Svelte #TODO
Uncaught (in promise) TypeError: anchor is null
in Header.svelte
in +layout.svelte
in root.svelte
#Neovim #Vim
local denops_src = vim.fn.stdpath("cache") .. "/dpp/repos/github.com/denops/denops.vim"
local dpp_src = vim.fn.stdpath("cache") .. "/dpp/repos/github.com/Shougo/dpp.vim"
if not vim.loop.fs_stat(dpp_src) then
#Neovim #Lua
随時更新
バッファ系
nvim_create_buf(listed, scratch)
新しいバッファを作成します。listedはバッファがバッファリストに表示されるかどうか、scratchはバッファがスクラッチ(一時的)バッファかどうかを指定します。
#Neovim #Lua
column_width = 120
line_endings = "Unix"
indent_type = "Tabs"
indent_width = 2
#Vim #Neovim
local colors = require("sakurajima.colors")
local highlight = require("sakurajima.highlight")
local M = {}
-- highlight.setup('lualine_a_command' xxx gui=bold guifg=#a7acb4 guibg=#2e7975
#JSR #Deno
https://jsr.io/docs/publishing-packages#publishing-from-github-actions
name: Publish
on:
push:
https://zenn.dev/hisayuki_mori/articles/cloudflare-node-version
#CSS
https://qiita.com/nabettu/items/1593af04e48444c45c53
button{
background-color: transparent;
border: none;
#CSS
word-break: break-all;
強制で折り返し表示出来る。
https://developer.mozilla.org/ja/docs/Web/CSS/CSS_text/Wrapping_breaking_text
nvim-treesitter.configsでnvim-ts-autotagの設定を書いていると下記のエラーが発生する。
#Neovim
Nvim Treesitter Setup is deprecated, use `require('nvim-ts-autotag').setup()` instead.
This feature will be removed in nvim-ts-autotag version 1.0.0
sharp
jimp
#SvelteKit
tipex
Prosemirror
tiptap
quill
#Sveltekit
共通のUIとデータは+layout.svelteと+layout.tsに配置。
個別のページコンテンツとデータは+page.svelteと+page.tsに配置。
サーバーサイド専用のロジックは+layout.server.tsと+page.server.tsに配置。
+layout.svelte
#Pritter
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
#JSX #Hono
{}だとreturnで返さないといけない。
return c.render(
<div class={mainClass}>
<h2>ドキュメント一覧</h2>
#Prettier
https://prettier.io/docs/en/vim.html
#Vite #HonoX
原因
Viteのglobインポートが静的な文字列リテラルしか対応していない。
変数やテンプレートリテラルなどはエラーになる。
▼エラーの例
#Rust #Zola
archlinuxのインストール方法
というかインストール方法めっちゃ細かく書いてくれてる
https://www.getzola.org/documentation/getting-started/installation/
#Git
git config --global init.defaultBranch main
#Neovim #Deno
インストール
coc.nvim
coc-deno
移行のタイミングで必ずnvim-lspconfigなどのbuiltin-lsp関連は読み込まないようにする。
#Neovim
markdown
coc-markdownlint
#Deno
ポート番号が重複している場合にエラー発生
AddrInUse: Address already in use (os error 98)
at listen (ext:deno_net/01_net.js:532:35)
at Object.serve (ext:deno_http/00_serve.ts:443:16)