diff options
| author | seth <[email protected]> | 2024-07-13 20:21:43 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2024-07-14 13:47:39 -0400 |
| commit | 8c76161eb8cf752c00a65cccccd381fb3bc5955d (patch) | |
| tree | 585ee4f939902150621bfa4ab855a7a742f10698 /lua | |
| parent | f5f52d704f17a31aaa6542cb9957b6443c2a5633 (diff) | |
factor out vim.{opt,g}
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/getchoo/globals.lua | 2 | ||||
| -rw-r--r-- | lua/getchoo/init.lua | 27 | ||||
| -rw-r--r-- | lua/getchoo/options.lua | 12 | ||||
| -rw-r--r-- | lua/getchoo/plugins/efmls.lua (renamed from lua/getchoo/efmls.lua) | 0 |
4 files changed, 16 insertions, 25 deletions
diff --git a/lua/getchoo/globals.lua b/lua/getchoo/globals.lua new file mode 100644 index 0000000..a9ff734 --- /dev/null +++ b/lua/getchoo/globals.lua @@ -0,0 +1,2 @@ +vim.g.mapleader = "," +vim.g.do_filetype_lua = 1 diff --git a/lua/getchoo/init.lua b/lua/getchoo/init.lua index a919bc8..25f6baf 100644 --- a/lua/getchoo/init.lua +++ b/lua/getchoo/init.lua @@ -1,25 +1,2 @@ -local opt = vim.opt - -opt.shiftwidth = 2 -opt.tabstop = 2 --- https://www.reddit.com/r/neovim/comments/14n6iiy/if_you_have_treesitter_make_sure_to_disable --- TLDR: this breaks things with treesitter indent -opt.smartindent = false -opt.number = true -opt.wrap = true -opt.syntax = "on" -opt.termguicolors = true -opt.mouse = "a" - -local backupDir = vim.fn.stdpath("state") .. "/backup" -local b = io.open(backupDir, "r") -if b then - b:close() -else - os.execute("mkdir -p " .. backupDir) -end - -opt.backupdir = backupDir - -vim.g.mapleader = "," -vim.g.do_filetype_lua = 1 +require("getchoo.options") +require("getchoo.globals") diff --git a/lua/getchoo/options.lua b/lua/getchoo/options.lua new file mode 100644 index 0000000..5ddf964 --- /dev/null +++ b/lua/getchoo/options.lua @@ -0,0 +1,12 @@ +local opt = vim.opt + +opt.shiftwidth = 2 +opt.tabstop = 2 +-- https://www.reddit.com/r/neovim/comments/14n6iiy/if_you_have_treesitter_make_sure_to_disable +-- TLDR: this breaks things with treesitter indent +opt.smartindent = false +opt.number = true +opt.wrap = true +opt.syntax = "on" +opt.termguicolors = true +opt.mouse = "a" diff --git a/lua/getchoo/efmls.lua b/lua/getchoo/plugins/efmls.lua index 92d61e9..92d61e9 100644 --- a/lua/getchoo/efmls.lua +++ b/lua/getchoo/plugins/efmls.lua |
