From b259a7bf534d2d8f52362e4d8bfd0691b040904e Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Tue, 25 Oct 2022 09:42:59 -0700 Subject: [PATCH] Fix some linting issues --- neovim/lua/plugins.lua | 4 ++-- neovim/lua/utils.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/neovim/lua/plugins.lua b/neovim/lua/plugins.lua index 12c59b7..998db3e 100644 --- a/neovim/lua/plugins.lua +++ b/neovim/lua/plugins.lua @@ -1,7 +1,7 @@ -- Install packer local utils = require("utils") local install_path = vim.fn.stdpath("data") .. "/site/pack/packer/opt/packer.nvim" -local packer_bootstrap = false +local packer_bootstrap = "" if vim.fn.empty(vim.fn.glob(install_path)) > 0 then packer_bootstrap = vim.fn.system({ "git", "clone", "https://github.com/wbthomason/packer.nvim", install_path }) end @@ -411,6 +411,6 @@ use({ }) -- Auto sync after bootstrapping on a fresh box -if packer_bootstrap then +if packer_bootstrap ~= "" then packer.sync() end diff --git a/neovim/lua/utils.lua b/neovim/lua/utils.lua index 8cd1bd0..21de75b 100644 --- a/neovim/lua/utils.lua +++ b/neovim/lua/utils.lua @@ -159,7 +159,7 @@ M.nil_val = {} -- If more than one rule matches, the one with the greatest version number is used function M.map_version_rule(rules) local v = vim.version() - local current_version = { v.major, v.minor, v.patch } + local current_version = { v and v.major, v and v.minor, v and v.patch } -- Parse a constraint and version of a string local parse_rule = function(rule_string)