-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
127 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- Any copyright is dedicated to the Public Domain. | ||
-- https://creativecommons.org/publicdomain/zero/1.0/ | ||
|
||
require('plugins') | ||
require('settings') | ||
require('autocmd') | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- Any copyright is dedicated to the Public Domain. | ||
-- https://creativecommons.org/publicdomain/zero/1.0/ | ||
|
||
-- Don't expand tabs for make files | ||
vim.api.nvim_create_autocmd({ 'FileType' }, { | ||
pattern = 'make', | ||
command = 'setlocal noexpandtab', | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
-- Any copyright is dedicated to the Public Domain. | ||
-- https://creativecommons.org/publicdomain/zero/1.0/ | ||
|
||
-- Function to install lazy if it's not already installed | ||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" | ||
if not vim.loop.fs_stat(lazypath) then | ||
vim.fn.system({ | ||
"git", | ||
"clone", | ||
"--filter=blob:none", | ||
"https://github.com/folke/lazy.nvim.git", | ||
"--branch=stable", -- latest stable release | ||
lazypath, | ||
}) | ||
end | ||
vim.opt.rtp:prepend(lazypath) | ||
|
||
-- Make sure to set `mapleader` before lazy so your mappings are correct | ||
vim.g.mapleader = " " | ||
|
||
require("lazy").setup({ | ||
"bling/vim-airline", | ||
"bhurlow/vim-parinfer", | ||
{"yorickpeterse/vim-paper", lazy = true}, | ||
{"fatih/vim-go", cmd = "GoUpdateBinaries"}, | ||
}) | ||
|
||
------------------------------------------------------ | ||
-- Plugin settings | ||
------------------------------------------------------ | ||
|
||
-- go | ||
vim.cmd([[ | ||
autocmd BufWritePre *.go :call LanguageClient#textDocument_formatting_sync() | ||
]]) | ||
|
||
vim.g.go_def_mode = "gopls" | ||
vim.g.go_info_mode = "gopls" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
-- Any copyright is dedicated to the Public Domain. | ||
-- https://creativecommons.org/publicdomain/zero/1.0/ | ||
|
||
vim.opt.laststatus = 2 | ||
|
||
-- Show full tags when doing search completion | ||
vim.opt.showfulltag = true | ||
vim.opt.expandtab = true | ||
|
||
-- Speed up macros | ||
vim.opt.lazyredraw = true | ||
|
||
-- No error noises | ||
vim.opt.errorbells = false | ||
vim.opt.visualbell = false | ||
|
||
-- Try to show at least three lines and two columns of | ||
-- context when scrolling | ||
vim.opt.scrolloff = 3 | ||
vim.opt.sidescrolloff = 2 | ||
|
||
-- Wrap and match | ||
vim.opt.whichwrap:append("<,>,[,]") | ||
vim.opt.matchpairs:append("<:>") | ||
|
||
-- Print with syntax highlighting and line numbers | ||
vim.opt.shiftwidth = 4 | ||
vim.opt.smartindent = true | ||
|
||
-- Turn off highlighting | ||
vim.opt.hls = false | ||
|
||
-- Disable line wrapping | ||
vim.opt.wrap = false | ||
|
||
-- Show us the command we're typing | ||
vim.opt.showcmd = true | ||
|
||
-- Highlight matching parens | ||
vim.opt.showmatch = true | ||
|
||
-- Set a dark background | ||
vim.opt.number = true | ||
vim.opt.numberwidth = 3 | ||
|
||
-- Allow hidden buffers | ||
vim.opt.hidden = true | ||
|
||
-- Create backups | ||
vim.opt.backup = true | ||
vim.cmd([[ | ||
try | ||
set backupdir=$HOME/.local/share/nvim/backups/ | ||
set directory=$HOME/.local/share/nvim/backups/ | ||
catch | ||
endtry | ||
]]) | ||
|
||
-- color scheme | ||
vim.cmd([[ | ||
if exists('+termguicolors') | ||
let &t_8f = "\<Esc>[38:2;%lu;%lu;%lum" | ||
let &t_8b = "\<Esc>[48:2;%lu;%lu;%lum" | ||
set t_Co=256 | ||
set termguicolors | ||
colorscheme paper | ||
endif | ||
]]) | ||
|
||
-- Python | ||
vim.g.python3_host_prog = "/usr/bin/python3" | ||
|