Skip to content

Instantly share code, notes, and snippets.

@humorless
Last active August 8, 2025 09:56
Show Gist options
  • Select an option

  • Save humorless/2c86ba4193d2c847fdd718528d666924 to your computer and use it in GitHub Desktop.

Select an option

Save humorless/2c86ba4193d2c847fdd718528d666924 to your computer and use it in GitHub Desktop.

Directory

  1. ~/.config/nvim => 設定檔
  2. ~/.local/share/nvim => 資料檔

;; share:繼承了 UNIX 的歷史,用於存放使用者專屬的、與系統架構無關的應用程式資料。(無關,所以可以被不同的 CPU share)

Command

  1. :luado 執行一個 lua command

API

  1. vim.fn.getcwd()

Code Snippet

  • 設定 path
(set package.path
     (.. (vim.fn.getcwd)
         "/lua/?.lua;"
         (vim.fn.getcwd)
         "/lua/?/init.lua;"
         package.path))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment