Initial Commit
This commit is contained in:
commit
f2ff7bda11
18 changed files with 342 additions and 0 deletions
4
lua/andrew/init.lua
Executable file
4
lua/andrew/init.lua
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
require("andrew.remap")
|
||||
require("andrew.packer")
|
||||
require("andrew.set")
|
||||
|
||||
72
lua/andrew/packer.lua
Executable file
72
lua/andrew/packer.lua
Executable file
|
|
@ -0,0 +1,72 @@
|
|||
vim.cmd.packadd("packer.nvim")
|
||||
|
||||
return require("packer").startup(function(use)
|
||||
use "wbthomason/packer.nvim"
|
||||
|
||||
-- Find files and strings
|
||||
use {
|
||||
"nvim-telescope/telescope.nvim", tag = "0.1.0",
|
||||
requires = { {"nvim-lua/plenary.nvim"} }
|
||||
}
|
||||
|
||||
-- Treesitter (I use mainly for syntax highlighting)
|
||||
use({"nvim-treesitter/nvim-treesitter", run = ":TSUpdate"})
|
||||
|
||||
-- VSCode-like theme
|
||||
use {
|
||||
"Mofiqul/vscode.nvim",
|
||||
commit = "db9ee33"
|
||||
}
|
||||
|
||||
-- Left-side file tryy dispaly
|
||||
use {
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
requires = {
|
||||
"nvim-tree/nvim-web-devicons", -- for file icons
|
||||
},
|
||||
tag = "nightly" -- optional, updated every week
|
||||
}
|
||||
|
||||
-- Shows current code 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
|
||||
}
|
||||
}
|
||||
|
||||
-- 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
|
||||
}
|
||||
end)
|
||||
|
||||
34
lua/andrew/remap.lua
Executable file
34
lua/andrew/remap.lua
Executable file
|
|
@ -0,0 +1,34 @@
|
|||
vim.g.mapleader = " "
|
||||
|
||||
-- opens file explorer
|
||||
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
|
||||
|
||||
-- centers cursor when jumping up and down page
|
||||
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
||||
vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
||||
|
||||
-- easier escape back to normal mode
|
||||
vim.keymap.set("i", "<C-c>", "<Esc>")
|
||||
|
||||
-- lol
|
||||
vim.keymap.set("n", "Q", "<nop>")
|
||||
|
||||
-- universal find and replace
|
||||
vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
|
||||
|
||||
-- moving highlighted text
|
||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
||||
|
||||
-- allow for pasting over without losing buffer
|
||||
vim.keymap.set("x", "<leader>p", "\"_dP")
|
||||
|
||||
-- allow copying to system clipboard
|
||||
vim.keymap.set("n", "<leader>y", "\"+y")
|
||||
vim.keymap.set("v", "<leader>y", "\"+y")
|
||||
vim.keymap.set("n", "<leader>y", "\"+y")
|
||||
|
||||
-- allow deleting to void register
|
||||
vim.keymap.set("n", "<leader>d", "\"_d")
|
||||
vim.keymap.set("v", "<leader>d", "\"_d")
|
||||
|
||||
17
lua/andrew/set.lua
Executable file
17
lua/andrew/set.lua
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
vim.opt.guicursor = ""
|
||||
|
||||
vim.opt.nu = true
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
||||
|
||||
vim.opt.smartindent = true
|
||||
|
||||
vim.opt.wrap = false
|
||||
|
||||
vim.opt.scrolloff = 8
|
||||
vim.opt.signcolumn = "auto"
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue