Skip to content

Instantly share code, notes, and snippets.

@wjkoh
Last active August 26, 2023 08:20
Show Gist options
  • Save wjkoh/163766e9a4a46c0c53155893b506909f to your computer and use it in GitHub Desktop.
Save wjkoh/163766e9a4a46c0c53155893b506909f to your computer and use it in GitHub Desktop.
LazyVim: Set working directory to the current file
-- ~/.config/nvim/lua/config/options.lua
-- See also https://vim.fandom.com/wiki/Set_working_directory_to_the_current_file
--
-- Options are automatically loaded before lazy.nvim startup
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here
vim.opt.autochdir = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment