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 | |
| parent | f5f52d704f17a31aaa6542cb9957b6443c2a5633 (diff) | |
factor out vim.{opt,g}
| -rw-r--r-- | after/plugin/globals.lua | 4 | ||||
| -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 | ||||
| -rw-r--r-- | neovim.nix | 6 | ||||
| -rw-r--r-- | plugin/lsp.lua | 2 |
7 files changed, 20 insertions, 33 deletions
diff --git a/after/plugin/globals.lua b/after/plugin/globals.lua index f2d5650..5da584b 100644 --- a/after/plugin/globals.lua +++ b/after/plugin/globals.lua @@ -1,4 +1,4 @@ --- for deno's lsp -vim.g.markdown_fenced_languages = { +vim.g.mapleader = "," +vim.g.do_filetype_lua = { "ts=typescript", } 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 @@ -101,11 +101,7 @@ let }; config = baseConfig // { - # init our configuration - luaRcContent = '' - require("getchoo") - ''; - + luaRcContent = "require('getchoo')"; wrapperArgs = baseConfig.wrapperArgs ++ [ "--suffix" "PATH" diff --git a/plugin/lsp.lua b/plugin/lsp.lua index 356add3..b652f71 100644 --- a/plugin/lsp.lua +++ b/plugin/lsp.lua @@ -28,7 +28,7 @@ local lsp_servers = { efm = { binary = "efm-langserver", - extraOptions = require("getchoo.efmls"), + extraOptions = require("getchoo.plugins.efmls"), }, lua_ls = { |
