move config directories into repo
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
require("liamm.set")
|
||||
require("liamm.remap")
|
||||
require("liamm.packer")
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
local M = {}
|
||||
|
||||
local function bind(op, outer_opts)
|
||||
outer_opts = outer_opts or {noremap = true}
|
||||
return function(lhs, rhs, opts)
|
||||
opts = vim.tbl_extend("force",
|
||||
outer_opts,
|
||||
opts or {}
|
||||
)
|
||||
vim.keymap.set(op, lhs, rhs, opts)
|
||||
end
|
||||
end
|
||||
|
||||
M.nmap = bind("n", {noremap = false})
|
||||
M.nnoremap = bind("n")
|
||||
M.vnoremap = bind("v")
|
||||
M.xnoremap = bind("x")
|
||||
M.inoremap = bind("i")
|
||||
|
||||
return M
|
||||
@@ -0,0 +1,56 @@
|
||||
return require('packer').startup(function(use)
|
||||
-- Packer can manage itself
|
||||
use 'wbthomason/packer.nvim'
|
||||
|
||||
--themes ---- commenting out ones I'm not actively using
|
||||
--use ({'EdenEast/nightfox.nvim' })
|
||||
--use 'rebelot/kanagawa.nvim' --not too bad a theme
|
||||
use({ 'rose-pine/neovim', as = 'rose-pine' }) --pretty nice themes
|
||||
--end themes
|
||||
|
||||
|
||||
--use 'Tetralux/odin.vim' --odin lang syntax highlighting
|
||||
--use 'rust-lang/rust.vim' // don't need this anymore
|
||||
use 'nvim-telescope/telescope.nvim'
|
||||
use('nvim-treesitter/nvim-treesitter', {run = ':TSUpdate'})
|
||||
use 'nvim-treesitter/playground'
|
||||
use 'nvim-treesitter/nvim-treesitter-context'
|
||||
use 'nvim-lua/plenary.nvim'
|
||||
use 'mbbill/undotree'
|
||||
use 'theprimeagen/harpoon'
|
||||
use 'nvim-lualine/lualine.nvim'
|
||||
use 'tpope/vim-fugitive' -- git integration
|
||||
--LSP CONFIG
|
||||
--
|
||||
use {
|
||||
'VonHeikemen/lsp-zero.nvim',
|
||||
branch = 'v2.x',
|
||||
requires = {
|
||||
-- LSP Support
|
||||
{'neovim/nvim-lspconfig'}, -- Required
|
||||
{ -- Optional
|
||||
'williamboman/mason.nvim',
|
||||
run = function()
|
||||
pcall(vim.cmd, 'MasonUpdate')
|
||||
end,
|
||||
},
|
||||
{'williamboman/mason-lspconfig.nvim'}, -- Optional
|
||||
|
||||
-- Autocompletion
|
||||
{'hrsh7th/nvim-cmp'}, -- Required
|
||||
{'hrsh7th/cmp-buffer'},
|
||||
{'hrsh7th/cmp-path'},
|
||||
{'saadparwaiz1/cmp_luasnip'},
|
||||
{'hrsh7th/cmp-nvim-lsp'}, -- Required
|
||||
{'hrsh7th/cmp-nvim-lua'},
|
||||
|
||||
-- Snippets
|
||||
{'L3MON4D3/LuaSnip'}, -- Required
|
||||
{'rafamadriz/friendly-snippets'},
|
||||
}
|
||||
}
|
||||
|
||||
use {"akinsho/toggleterm.nvim", tag = '*', config = function()
|
||||
require("toggleterm").setup()
|
||||
end}
|
||||
end)
|
||||
@@ -0,0 +1,30 @@
|
||||
local nnoremap = require("liamm.keymap").nnoremap
|
||||
|
||||
nnoremap("<leader>pv", "<cmd>Ex<CR>")
|
||||
nnoremap("<leader>tv", "<cmd>ToggleTerm<CR>")
|
||||
nnoremap("<leader>tt", "<cmd>TSContextToggle<CR>")
|
||||
|
||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
||||
|
||||
vim.keymap.set("n", "J", "mzJ`z")
|
||||
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
||||
vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
||||
vim.keymap.set("n", "n", "nzzzv")
|
||||
vim.keymap.set("n", "N", "Nzzzv")
|
||||
|
||||
vim.keymap.set("n", "<leader>y", "\"+y")
|
||||
vim.keymap.set("v", "<leader>y", "\"+y")
|
||||
vim.keymap.set("n", "<leader>Y", "\"+Y")
|
||||
|
||||
vim.keymap.set("n", "<leader>x", "<cmd>!chmod +x %<CR>", {silent = true})
|
||||
|
||||
-- put nvim to background
|
||||
vim.keymap.set("n", "<leader>z", "<C-z>")
|
||||
|
||||
-- emacs-inspired binds
|
||||
-- all <C-w> can be done w spacebar-w
|
||||
vim.keymap.set("n", "<leader>w", "<C-w>")
|
||||
vim.keymap.set("n", "<leader>qq", ":x<CR>")
|
||||
nnoremap("<leader>.", ":find ~/")
|
||||
nnoremap("<leader>fc", ":find ~/.config/nvim/lua/liamm/remap.lua<CR>")
|
||||
@@ -0,0 +1,31 @@
|
||||
vim.opt.guicursor = ""
|
||||
|
||||
vim.opt.nu = true
|
||||
vim.opt.rnu = true
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.hlsearch = false
|
||||
vim.opt.incsearch = true
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.splitright = true
|
||||
vim.opt.splitbelow = true
|
||||
|
||||
vim.opt.updatetime = 40
|
||||
|
||||
vim.opt.colorcolumn = ""
|
||||
|
||||
vim.opt.smartindent = true
|
||||
|
||||
vim.opt.wrap = false
|
||||
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.backup = false
|
||||
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
||||
vim.opt.undofile = true
|
||||
|
||||
vim.opt.scrolloff = 8
|
||||
vim.opt.updatetime = 50
|
||||
|
||||
vim.g.mapleader = " "
|
||||
Reference in New Issue
Block a user