Set .lua files to 2-space tabs

This commit is contained in:
agryphus 2023-05-23 11:03:53 -04:00
parent 402eddfda2
commit cd3958ca0f
10 changed files with 102 additions and 95 deletions

4
after/ftplugin/lua.lua Normal file
View file

@ -0,0 +1,4 @@
vim.opt.tabstop = 2
vim.opt.softtabstop = 2
vim.opt.shiftwidth = 2

View file

@ -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 })

View file

@ -1,9 +1,9 @@
require("Comment").setup()
vim.keymap.set(
"n",
"<C-_>",
function() require("Comment.api").toggle.linewise.current() end,
{ noremap = true, silent = true }
"n",
"<C-_>",
function() require("Comment.api").toggle.linewise.current() end,
{ noremap = true, silent = true }
)

View file

@ -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

View file

@ -1,4 +1,4 @@
vim.g.lightline = {
colorscheme = "one"
colorscheme = "one"
}

View file

@ -1,12 +1,12 @@
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<leader>pf", builtin.find_files, {})
vim.keymap.set("n", "<leader>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" }
}
}

View file

@ -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,
},
}

View file

@ -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
]])

View file

@ -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)

View file

@ -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()
]])