From fbe98b83616f9fded862f7891560abc141d01f44 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Wed, 26 Oct 2022 09:48:18 -0500 Subject: [PATCH] fix(nvim): use opt_local for ftplugin --- .../primary/config/after/ftplugin/Dockerfile.lua | 2 +- .../primary/config/after/ftplugin/NeogitCommitMessage.lua | 2 +- .../primary/config/after/ftplugin/azure.lua | 2 +- .../primary/config/after/ftplugin/html.lua | 6 ++---- .../primary/config/after/ftplugin/make.lua | 1 - .../primary/config/after/ftplugin/markdown.lua | 8 +++----- .../primary/config/after/ftplugin/sh.lua | 1 - .../primary/config/after/ftplugin/zsh.lua | 4 ++-- 8 files changed, 10 insertions(+), 16 deletions(-) diff --git a/dots/.nvim-environments/primary/config/after/ftplugin/Dockerfile.lua b/dots/.nvim-environments/primary/config/after/ftplugin/Dockerfile.lua index 38e9ce5f..6fdb05bb 100644 --- a/dots/.nvim-environments/primary/config/after/ftplugin/Dockerfile.lua +++ b/dots/.nvim-environments/primary/config/after/ftplugin/Dockerfile.lua @@ -1,3 +1,3 @@ local file_loc = vim.fn.expand('%:p:h') -vim.opt.makeprg = 'docker build ' .. file_loc +vim.opt_local.makeprg = 'docker build ' .. file_loc diff --git a/dots/.nvim-environments/primary/config/after/ftplugin/NeogitCommitMessage.lua b/dots/.nvim-environments/primary/config/after/ftplugin/NeogitCommitMessage.lua index 94700636..a0228d66 100644 --- a/dots/.nvim-environments/primary/config/after/ftplugin/NeogitCommitMessage.lua +++ b/dots/.nvim-environments/primary/config/after/ftplugin/NeogitCommitMessage.lua @@ -1 +1 @@ -vim.opt.filetype = 'gitcommit' +vim.opt_local.filetype = 'gitcommit' diff --git a/dots/.nvim-environments/primary/config/after/ftplugin/azure.lua b/dots/.nvim-environments/primary/config/after/ftplugin/azure.lua index 73bec3a3..3e836b3c 100644 --- a/dots/.nvim-environments/primary/config/after/ftplugin/azure.lua +++ b/dots/.nvim-environments/primary/config/after/ftplugin/azure.lua @@ -1 +1 @@ -vim.opt.filetype = 'yaml' +vim.opt_local.filetype = 'yaml' diff --git a/dots/.nvim-environments/primary/config/after/ftplugin/html.lua b/dots/.nvim-environments/primary/config/after/ftplugin/html.lua index 6aeb9213..9e469a14 100644 --- a/dots/.nvim-environments/primary/config/after/ftplugin/html.lua +++ b/dots/.nvim-environments/primary/config/after/ftplugin/html.lua @@ -1,4 +1,2 @@ -local opt = vim.opt - -opt.tabstop = 2 -opt.shiftwidth = 2 +vim.opt_local.tabstop = 2 +vim.opt_local.shiftwidth = 2 diff --git a/dots/.nvim-environments/primary/config/after/ftplugin/make.lua b/dots/.nvim-environments/primary/config/after/ftplugin/make.lua index 0db62ef7..3436b9cc 100644 --- a/dots/.nvim-environments/primary/config/after/ftplugin/make.lua +++ b/dots/.nvim-environments/primary/config/after/ftplugin/make.lua @@ -1,2 +1 @@ -vim.opt.expandtab = false vim.opt_local.expandtab = false diff --git a/dots/.nvim-environments/primary/config/after/ftplugin/markdown.lua b/dots/.nvim-environments/primary/config/after/ftplugin/markdown.lua index ca9af84e..cc77bdec 100644 --- a/dots/.nvim-environments/primary/config/after/ftplugin/markdown.lua +++ b/dots/.nvim-environments/primary/config/after/ftplugin/markdown.lua @@ -1,5 +1,3 @@ -local opt = vim.opt - -opt.tabstop = 2 -opt.shiftwidth = 2 -opt.textwidth = 0 +vim.opt_local.tabstop = 2 +vim.opt_local.shiftwidth = 2 +vim.opt_local.textwidth = 0 diff --git a/dots/.nvim-environments/primary/config/after/ftplugin/sh.lua b/dots/.nvim-environments/primary/config/after/ftplugin/sh.lua index 0db62ef7..3436b9cc 100644 --- a/dots/.nvim-environments/primary/config/after/ftplugin/sh.lua +++ b/dots/.nvim-environments/primary/config/after/ftplugin/sh.lua @@ -1,2 +1 @@ -vim.opt.expandtab = false vim.opt_local.expandtab = false diff --git a/dots/.nvim-environments/primary/config/after/ftplugin/zsh.lua b/dots/.nvim-environments/primary/config/after/ftplugin/zsh.lua index 035e7cdf..3bc5df49 100644 --- a/dots/.nvim-environments/primary/config/after/ftplugin/zsh.lua +++ b/dots/.nvim-environments/primary/config/after/ftplugin/zsh.lua @@ -1,3 +1,3 @@ -vim.opt.expandtab = false vim.opt_local.expandtab = false -vim.opt.tabstop = 4 +vim.opt_local.expandtab = false +vim.opt_local.tabstop = 4