From cd3958ca0f20de39302c27878724072e2c71a240 Mon Sep 17 00:00:00 2001 From: agryphus Date: Tue, 23 May 2023 11:03:53 -0400 Subject: [PATCH] Set .lua files to 2-space tabs --- after/ftplugin/lua.lua | 4 ++ after/plugin/colors.lua | 3 + after/plugin/comment.lua | 8 +-- after/plugin/firenvim.lua | 20 +++--- after/plugin/lightline.lua | 2 +- after/plugin/telescope.lua | 8 +-- after/plugin/treesitter.lua | 16 ++--- after/plugin/vimtex.lua | 6 +- lua/andrew/packer.lua | 126 ++++++++++++++++++------------------ lua/andrew/set.lua | 4 +- 10 files changed, 102 insertions(+), 95 deletions(-) create mode 100644 after/ftplugin/lua.lua diff --git a/after/ftplugin/lua.lua b/after/ftplugin/lua.lua new file mode 100644 index 0000000..806b55a --- /dev/null +++ b/after/ftplugin/lua.lua @@ -0,0 +1,4 @@ +vim.opt.tabstop = 2 +vim.opt.softtabstop = 2 +vim.opt.shiftwidth = 2 + diff --git a/after/plugin/colors.lua b/after/plugin/colors.lua index ce64bd0..92ed5c2 100755 --- a/after/plugin/colors.lua +++ b/after/plugin/colors.lua @@ -43,7 +43,10 @@ vim.cmd[[colorscheme no-clown-fiesta]] -- My own color overrides local hl = vim.api.nvim_set_hl hl(0, 'TSConstant', { fg = palette.yellow }) +hl(0, 'EndOfBuffer', { fg = palette.medium_gray }) hl(0, 'ErrorMsg', { fg = palette.yellow }) hl(0, 'LineNr', { fg = palette.medium_gray }) +hl(0, 'NvimTreeCursorLine', { fg = palette.yellow }) +hl(0, 'NvimTreeEndOfBuffer', { fg = palette.medium_gray }) hl(0, 'NvimTreeFolderIcon', { fg = palette.yellow }) diff --git a/after/plugin/comment.lua b/after/plugin/comment.lua index 121e765..a595cbd 100755 --- a/after/plugin/comment.lua +++ b/after/plugin/comment.lua @@ -1,9 +1,9 @@ require("Comment").setup() vim.keymap.set( - "n", - "", - function() require("Comment.api").toggle.linewise.current() end, - { noremap = true, silent = true } + "n", + "", + function() require("Comment.api").toggle.linewise.current() end, + { noremap = true, silent = true } ) diff --git a/after/plugin/firenvim.lua b/after/plugin/firenvim.lua index 19b99fb..d937c09 100755 --- a/after/plugin/firenvim.lua +++ b/after/plugin/firenvim.lua @@ -1,18 +1,18 @@ vim.g.firenvim_config = { - globalSettings = { alt = "all" }, - localSettings = { - [".*"] = { - cmdline = "neovim", - content = "text", - priority = 0, - selector = "textarea", - takeover = "never" - } + globalSettings = { alt = "all" }, + localSettings = { + [".*"] = { + cmdline = "neovim", + content = "text", + priority = 0, + selector = "textarea", + takeover = "never" } + } } -- Prevents scrolling when cursor is near the bottom of the text area if vim.g.started_by_firenvim == true then - vim.opt.scrolloff = 0 + vim.opt.scrolloff = 0 end diff --git a/after/plugin/lightline.lua b/after/plugin/lightline.lua index a18c054..b34c7f6 100755 --- a/after/plugin/lightline.lua +++ b/after/plugin/lightline.lua @@ -1,4 +1,4 @@ vim.g.lightline = { - colorscheme = "one" + colorscheme = "one" } diff --git a/after/plugin/telescope.lua b/after/plugin/telescope.lua index dc6298f..2616dc6 100755 --- a/after/plugin/telescope.lua +++ b/after/plugin/telescope.lua @@ -1,12 +1,12 @@ local builtin = require("telescope.builtin") vim.keymap.set("n", "pf", builtin.find_files, {}) vim.keymap.set("n", "ps", function() - builtin.grep_string({ search = vim.fn.input("Grep > ") }) + builtin.grep_string({ search = vim.fn.input("Grep > ") }) end) require("telescope").setup{ - defaults = { - file_ignore_patterns = { ".git\\", ".pyc", ".mypy_cache\\", "node_modules\\", ".svg" } - } + defaults = { + file_ignore_patterns = { ".git\\", ".pyc", ".mypy_cache\\", "node_modules\\", ".svg" } + } } diff --git a/after/plugin/treesitter.lua b/after/plugin/treesitter.lua index 0976e28..a4881fb 100755 --- a/after/plugin/treesitter.lua +++ b/after/plugin/treesitter.lua @@ -1,16 +1,16 @@ require'nvim-treesitter.configs'.setup { - ensure_installed = { "rust", "vim", "javascript", "html", "css", "python", "java", "lua", "perl", "php", "c", "json" }, + ensure_installed = { "rust", "vim", "javascript", "html", "css", "python", "java", "lua", "perl", "php", "c", "json" }, - ignore_install = { "latex", "markdown", "htmldjango" }, + ignore_install = { "latex", "markdown", "htmldjango" }, - sync_install = false, + sync_install = false, - auto_install = false, + auto_install = false, - highlight = { - enable = true, + highlight = { + enable = true, - addition_vim_regex_highlighting = false, - }, + addition_vim_regex_highlighting = false, + }, } diff --git a/after/plugin/vimtex.lua b/after/plugin/vimtex.lua index a4545ab..237e7ce 100755 --- a/after/plugin/vimtex.lua +++ b/after/plugin/vimtex.lua @@ -10,14 +10,14 @@ let g:vimtex_quickfix_mode=0 " settings for sumatraPDF let g:vimtex_view_general_viewer = 'C:\Users\andre\AppData\Local\SumatraPDF\SumatraPDF.exe' let g:vimtex_view_general_options - \ = '-reuse-instance -forward-search @tex @line @pdf' + \ = '-reuse-instance -forward-search @tex @line @pdf' set conceallevel=1 let g:tex_conceal='abdmg' augroup vimtex_config - au! - au User VimtexEventQuit call vimtex#compiler#clean(0) + au! + au User VimtexEventQuit call vimtex#compiler#clean(0) augroup END ]]) diff --git a/lua/andrew/packer.lua b/lua/andrew/packer.lua index 2bb8396..d047c11 100755 --- a/lua/andrew/packer.lua +++ b/lua/andrew/packer.lua @@ -1,81 +1,81 @@ vim.cmd.packadd("packer.nvim") return require("packer").startup(function(use) - use "wbthomason/packer.nvim" + use "wbthomason/packer.nvim" - -- Find files and strings - use { - "nvim-telescope/telescope.nvim", tag = "0.1.0", - requires = { {"nvim-lua/plenary.nvim"} } - } + -- Find files and strings + use { + "nvim-telescope/telescope.nvim", tag = "0.1.0", + requires = { {"nvim-lua/plenary.nvim"} } + } - -- Treesittep - use({"nvim-treesitter/nvim-treesitter", run = ":TSUpdate"}) + -- Treesittep + use({"nvim-treesitter/nvim-treesitter", run = ":TSUpdate"}) - -- Themes - use "aktersnurra/no-clown-fiesta.nvim" + -- Themes + use "aktersnurra/no-clown-fiesta.nvim" - -- Referencing a hex code highlights it in that color - use "lilydjwg/colorizer" + -- Referencing a hex code highlights it in that color + use "lilydjwg/colorizer" - -- Relative line numbers disappear when not actively in buffer - use "jeffkreeftmeijer/vim-numbertoggle" + -- Relative line numbers disappear when not actively in buffer + use "jeffkreeftmeijer/vim-numbertoggle" - -- Left-side file tree dispaly - use { - "nvim-tree/nvim-tree.lua", - requires = { - "nvim-tree/nvim-web-devicons", -- for file icons - }, - tag = "nightly" -- optional, updated every week + -- Left-side file tree dispaly + use { + "nvim-tree/nvim-tree.lua", + requires = { + "nvim-tree/nvim-web-devicons", -- for file icons + }, + tag = "nightly" -- optional, updated every week + } + + -- Shows current mode on bottom of screen + use "itchyny/lightline.vim" + + -- LSP + use { + 'VonHeikemen/lsp-zero.nvim', + branch = 'v1.x', + requires = { + -- LSP Support + {'neovim/nvim-lspconfig'}, -- Required + {'williamboman/mason.nvim'}, -- Optional + {'williamboman/mason-lspconfig.nvim'}, -- Optional + + -- Autocompletion + {'hrsh7th/nvim-cmp'}, -- Required + {'hrsh7th/cmp-nvim-lsp'}, -- Required + {'hrsh7th/cmp-buffer'}, -- Optional + {'hrsh7th/cmp-path'}, -- Optional + {'saadparwaiz1/cmp_luasnip'}, -- Optional + {'hrsh7th/cmp-nvim-lua'}, -- Optional + + -- Snippets + {'L3MON4D3/LuaSnip'}, -- Required + {'rafamadriz/friendly-snippets'}, -- Optional } + } - -- Shows current mode on bottom of screen - use "itchyny/lightline.vim" + -- Linting + use "jose-elias-alvarez/null-ls.nvim" - -- LSP - use { - 'VonHeikemen/lsp-zero.nvim', - branch = 'v1.x', - requires = { - -- LSP Support - {'neovim/nvim-lspconfig'}, -- Required - {'williamboman/mason.nvim'}, -- Optional - {'williamboman/mason-lspconfig.nvim'}, -- Optional + -- Git wrapper + use("tpope/vim-fugitive") - -- Autocompletion - {'hrsh7th/nvim-cmp'}, -- Required - {'hrsh7th/cmp-nvim-lsp'}, -- Required - {'hrsh7th/cmp-buffer'}, -- Optional - {'hrsh7th/cmp-path'}, -- Optional - {'saadparwaiz1/cmp_luasnip'}, -- Optional - {'hrsh7th/cmp-nvim-lua'}, -- Optional + -- Latex editing in vim + use "lervag/vimtex" - -- Snippets - {'L3MON4D3/LuaSnip'}, -- Required - {'rafamadriz/friendly-snippets'}, -- Optional - } - } + -- Vim Games :D + use "ThePrimeagen/vim-be-good" - -- Linting - use "jose-elias-alvarez/null-ls.nvim" + -- Auto comment + use "numToStr/Comment.nvim" - -- Git wrapper - use("tpope/vim-fugitive") - - -- Latex editing in vim - use "lervag/vimtex" - - -- Vim Games :D - use "ThePrimeagen/vim-be-good" - - -- Auto comment - use "numToStr/Comment.nvim" - - -- Jupyter notebook integration - use { - "glacambre/firenvim", - run = function() vim.fn["firenvim#install"](0) end - } + -- Jupyter notebook integration + use { + "glacambre/firenvim", + run = function() vim.fn["firenvim#install"](0) end + } end) diff --git a/lua/andrew/set.lua b/lua/andrew/set.lua index 2925823..4e65ba2 100755 --- a/lua/andrew/set.lua +++ b/lua/andrew/set.lua @@ -21,8 +21,8 @@ vim.o.shell = "/usr/bin/zsh" -- I don't believe this functionality has been ported to lua. vim.cmd([[ function! TerminalSettings() - setlocal nonumber norelativenumber - setlocal scrolloff=0 + setlocal nonumber norelativenumber + setlocal scrolloff=0 endfunction autocmd TermOpen * call TerminalSettings() ]])