Set .lua files to 2-space tabs
This commit is contained in:
parent
402eddfda2
commit
cd3958ca0f
10 changed files with 102 additions and 95 deletions
4
after/ftplugin/lua.lua
Normal file
4
after/ftplugin/lua.lua
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
vim.opt.tabstop = 2
|
||||||
|
vim.opt.softtabstop = 2
|
||||||
|
vim.opt.shiftwidth = 2
|
||||||
|
|
||||||
|
|
@ -43,7 +43,10 @@ vim.cmd[[colorscheme no-clown-fiesta]]
|
||||||
-- My own color overrides
|
-- My own color overrides
|
||||||
local hl = vim.api.nvim_set_hl
|
local hl = vim.api.nvim_set_hl
|
||||||
hl(0, 'TSConstant', { fg = palette.yellow })
|
hl(0, 'TSConstant', { fg = palette.yellow })
|
||||||
|
hl(0, 'EndOfBuffer', { fg = palette.medium_gray })
|
||||||
hl(0, 'ErrorMsg', { fg = palette.yellow })
|
hl(0, 'ErrorMsg', { fg = palette.yellow })
|
||||||
hl(0, 'LineNr', { fg = palette.medium_gray })
|
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 })
|
hl(0, 'NvimTreeFolderIcon', { fg = palette.yellow })
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
require("Comment").setup()
|
require("Comment").setup()
|
||||||
|
|
||||||
vim.keymap.set(
|
vim.keymap.set(
|
||||||
"n",
|
"n",
|
||||||
"<C-_>",
|
"<C-_>",
|
||||||
function() require("Comment.api").toggle.linewise.current() end,
|
function() require("Comment.api").toggle.linewise.current() end,
|
||||||
{ noremap = true, silent = true }
|
{ noremap = true, silent = true }
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,18 @@
|
||||||
vim.g.firenvim_config = {
|
vim.g.firenvim_config = {
|
||||||
globalSettings = { alt = "all" },
|
globalSettings = { alt = "all" },
|
||||||
localSettings = {
|
localSettings = {
|
||||||
[".*"] = {
|
[".*"] = {
|
||||||
cmdline = "neovim",
|
cmdline = "neovim",
|
||||||
content = "text",
|
content = "text",
|
||||||
priority = 0,
|
priority = 0,
|
||||||
selector = "textarea",
|
selector = "textarea",
|
||||||
takeover = "never"
|
takeover = "never"
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Prevents scrolling when cursor is near the bottom of the text area
|
-- Prevents scrolling when cursor is near the bottom of the text area
|
||||||
if vim.g.started_by_firenvim == true then
|
if vim.g.started_by_firenvim == true then
|
||||||
vim.opt.scrolloff = 0
|
vim.opt.scrolloff = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
vim.g.lightline = {
|
vim.g.lightline = {
|
||||||
colorscheme = "one"
|
colorscheme = "one"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
local builtin = require("telescope.builtin")
|
local builtin = require("telescope.builtin")
|
||||||
vim.keymap.set("n", "<leader>pf", builtin.find_files, {})
|
vim.keymap.set("n", "<leader>pf", builtin.find_files, {})
|
||||||
vim.keymap.set("n", "<leader>ps", function()
|
vim.keymap.set("n", "<leader>ps", function()
|
||||||
builtin.grep_string({ search = vim.fn.input("Grep > ") })
|
builtin.grep_string({ search = vim.fn.input("Grep > ") })
|
||||||
end)
|
end)
|
||||||
|
|
||||||
require("telescope").setup{
|
require("telescope").setup{
|
||||||
defaults = {
|
defaults = {
|
||||||
file_ignore_patterns = { ".git\\", ".pyc", ".mypy_cache\\", "node_modules\\", ".svg" }
|
file_ignore_patterns = { ".git\\", ".pyc", ".mypy_cache\\", "node_modules\\", ".svg" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
require'nvim-treesitter.configs'.setup {
|
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 = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
|
|
||||||
addition_vim_regex_highlighting = false,
|
addition_vim_regex_highlighting = false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,14 +10,14 @@ let g:vimtex_quickfix_mode=0
|
||||||
" settings for sumatraPDF
|
" settings for sumatraPDF
|
||||||
let g:vimtex_view_general_viewer = 'C:\Users\andre\AppData\Local\SumatraPDF\SumatraPDF.exe'
|
let g:vimtex_view_general_viewer = 'C:\Users\andre\AppData\Local\SumatraPDF\SumatraPDF.exe'
|
||||||
let g:vimtex_view_general_options
|
let g:vimtex_view_general_options
|
||||||
\ = '-reuse-instance -forward-search @tex @line @pdf'
|
\ = '-reuse-instance -forward-search @tex @line @pdf'
|
||||||
|
|
||||||
set conceallevel=1
|
set conceallevel=1
|
||||||
let g:tex_conceal='abdmg'
|
let g:tex_conceal='abdmg'
|
||||||
|
|
||||||
augroup vimtex_config
|
augroup vimtex_config
|
||||||
au!
|
au!
|
||||||
au User VimtexEventQuit call vimtex#compiler#clean(0)
|
au User VimtexEventQuit call vimtex#compiler#clean(0)
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
]])
|
]])
|
||||||
|
|
|
||||||
|
|
@ -1,81 +1,81 @@
|
||||||
vim.cmd.packadd("packer.nvim")
|
vim.cmd.packadd("packer.nvim")
|
||||||
|
|
||||||
return require("packer").startup(function(use)
|
return require("packer").startup(function(use)
|
||||||
use "wbthomason/packer.nvim"
|
use "wbthomason/packer.nvim"
|
||||||
|
|
||||||
-- Find files and strings
|
-- Find files and strings
|
||||||
use {
|
use {
|
||||||
"nvim-telescope/telescope.nvim", tag = "0.1.0",
|
"nvim-telescope/telescope.nvim", tag = "0.1.0",
|
||||||
requires = { {"nvim-lua/plenary.nvim"} }
|
requires = { {"nvim-lua/plenary.nvim"} }
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Treesittep
|
-- Treesittep
|
||||||
use({"nvim-treesitter/nvim-treesitter", run = ":TSUpdate"})
|
use({"nvim-treesitter/nvim-treesitter", run = ":TSUpdate"})
|
||||||
|
|
||||||
-- Themes
|
-- Themes
|
||||||
use "aktersnurra/no-clown-fiesta.nvim"
|
use "aktersnurra/no-clown-fiesta.nvim"
|
||||||
|
|
||||||
-- Referencing a hex code highlights it in that color
|
-- Referencing a hex code highlights it in that color
|
||||||
use "lilydjwg/colorizer"
|
use "lilydjwg/colorizer"
|
||||||
|
|
||||||
-- Relative line numbers disappear when not actively in buffer
|
-- Relative line numbers disappear when not actively in buffer
|
||||||
use "jeffkreeftmeijer/vim-numbertoggle"
|
use "jeffkreeftmeijer/vim-numbertoggle"
|
||||||
|
|
||||||
-- Left-side file tree dispaly
|
-- Left-side file tree dispaly
|
||||||
use {
|
use {
|
||||||
"nvim-tree/nvim-tree.lua",
|
"nvim-tree/nvim-tree.lua",
|
||||||
requires = {
|
requires = {
|
||||||
"nvim-tree/nvim-web-devicons", -- for file icons
|
"nvim-tree/nvim-web-devicons", -- for file icons
|
||||||
},
|
},
|
||||||
tag = "nightly" -- optional, updated every week
|
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
|
-- Linting
|
||||||
use "itchyny/lightline.vim"
|
use "jose-elias-alvarez/null-ls.nvim"
|
||||||
|
|
||||||
-- LSP
|
-- Git wrapper
|
||||||
use {
|
use("tpope/vim-fugitive")
|
||||||
'VonHeikemen/lsp-zero.nvim',
|
|
||||||
branch = 'v1.x',
|
|
||||||
requires = {
|
|
||||||
-- LSP Support
|
|
||||||
{'neovim/nvim-lspconfig'}, -- Required
|
|
||||||
{'williamboman/mason.nvim'}, -- Optional
|
|
||||||
{'williamboman/mason-lspconfig.nvim'}, -- Optional
|
|
||||||
|
|
||||||
-- Autocompletion
|
-- Latex editing in vim
|
||||||
{'hrsh7th/nvim-cmp'}, -- Required
|
use "lervag/vimtex"
|
||||||
{'hrsh7th/cmp-nvim-lsp'}, -- Required
|
|
||||||
{'hrsh7th/cmp-buffer'}, -- Optional
|
|
||||||
{'hrsh7th/cmp-path'}, -- Optional
|
|
||||||
{'saadparwaiz1/cmp_luasnip'}, -- Optional
|
|
||||||
{'hrsh7th/cmp-nvim-lua'}, -- Optional
|
|
||||||
|
|
||||||
-- Snippets
|
-- Vim Games :D
|
||||||
{'L3MON4D3/LuaSnip'}, -- Required
|
use "ThePrimeagen/vim-be-good"
|
||||||
{'rafamadriz/friendly-snippets'}, -- Optional
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Linting
|
-- Auto comment
|
||||||
use "jose-elias-alvarez/null-ls.nvim"
|
use "numToStr/Comment.nvim"
|
||||||
|
|
||||||
-- Git wrapper
|
-- Jupyter notebook integration
|
||||||
use("tpope/vim-fugitive")
|
use {
|
||||||
|
"glacambre/firenvim",
|
||||||
-- Latex editing in vim
|
run = function() vim.fn["firenvim#install"](0) end
|
||||||
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
|
|
||||||
}
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,8 @@ vim.o.shell = "/usr/bin/zsh"
|
||||||
-- I don't believe this functionality has been ported to lua.
|
-- I don't believe this functionality has been ported to lua.
|
||||||
vim.cmd([[
|
vim.cmd([[
|
||||||
function! TerminalSettings()
|
function! TerminalSettings()
|
||||||
setlocal nonumber norelativenumber
|
setlocal nonumber norelativenumber
|
||||||
setlocal scrolloff=0
|
setlocal scrolloff=0
|
||||||
endfunction
|
endfunction
|
||||||
autocmd TermOpen * call TerminalSettings()
|
autocmd TermOpen * call TerminalSettings()
|
||||||
]])
|
]])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue