6 files changed, 0 insertions(+), 286 deletions(-)
D config/nvim/init.lua
D config/nvim/lua/go.lua
D config/nvim/lua/plugin.theme.lua
D config/nvim/lua/plugin_completion.lua
D config/nvim/lua/plugin_theme.lua
D config/nvim/lua/plugins.lua
D config/nvim/init.lua => config/nvim/init.lua +0 -125
@@ 1,125 0,0 @@
--- highlight column 80
-vim.wo.colorcolumn = '80'
-
--- make space the leader key
-vim.g.mapleader = ' '
-
--- tab bindings are atrocious
-vim.api.nvim_set_keymap("n", "tr", ":bp<CR>", {})
-vim.api.nvim_set_keymap("n", "tz", ":bn<CR>", {})
-vim.api.nvim_set_keymap("n", "tc", ":bd<CR>", {})
-vim.api.nvim_set_keymap("n", "-", ":Explore<CR>", {})
-
--- disable those useless shits
-vim.api.nvim_set_keymap("n", "<PageUp>", "<nop>", {})
-vim.api.nvim_set_keymap("n", "<PageDown>", "<nop>", {})
-
--- clear highlights on enter and escape
-vim.opt.incsearch = true
-vim.opt.hlsearch = true
-vim.opt.ignorecase = true
-vim.opt.smartcase = true
-vim.api.nvim_set_keymap("n", "<Esc>", ":noh<CR>", {silent = true})
-vim.api.nvim_set_keymap("n", "<CR>", ":noh<CR>", {silent = true})
-
--- completion-menu
-vim.opt.wildmode = "longest,list,full"
-vim.opt.completeopt = "longest,menuone"
-
--- auto-load changes
-vim.opt.autoread = true
-
--- always show 2 lines around the cursor
-vim.opt.scrolloff = 2
-
--- don't expand cache or temporary paths
-vim.opt.wildignore = {'*/cache/*', '*/tmp/*'}
-
--- show line numbers
-vim.opt.number = true
-
--- syntax highlighting… we aren't savages
-vim.opt.syntax = "enable"
-
--- make :find actually find things
-vim.opt.path = vim.opt.path + ",**"
-
--- disable mouse
-vim.opt.mouse = ""
-
--- sane indentation settings
-vim.opt.autoindent = true
-vim.opt.shiftwidth = 8
-vim.opt.softtabstop = 8
-vim.opt.tabstop = 8
-vim.opt.expandtab = false
-
--- wrapping at whitespace
-vim.opt.lbr = true
-vim.opt.breakindent = true
-vim.opt.formatoptions = "tcrqn1j"
-
--- unmap space and reassign as <leader>
-vim.api.nvim_set_keymap('', '<Space>', '<Nop>', { noremap = true, silent = true })
-vim.g.mapleader = " "
-vim.g.maplocalleader = " "
-
--- map quickfix stuff to <leader>c
-vim.api.nvim_set_keymap('n', '<leader>cc', ':cw<cr>', { noremap = true, silent = true })
-vim.api.nvim_set_keymap('n', '<leader>cg', ':.cc<cr>', { noremap = true, silent = true })
-vim.api.nvim_set_keymap('n', '<leader>cn', ':cn<cr>', { noremap = true, silent = true })
-vim.api.nvim_set_keymap('n', '<leader>cp', ':cp<cr>', { noremap = true, silent = true })
-
-vim.api.nvim_set_keymap('n', '<s-up>', ':wincmd k<cr>', { noremap = true, silent = true })
-vim.api.nvim_set_keymap('n', '<s-down>', ':wincmd j<cr>', { noremap = true, silent = true })
-vim.api.nvim_set_keymap('n', '<s-left>', ':wincmd h<cr>', { noremap = true, silent = true })
-vim.api.nvim_set_keymap('n', '<s-right>', ':wincmd l<cr>', { noremap = true, silent = true })
-
--- TODO: find alternative
--- vim.keymap.set('n', 'gb', ':call setbufvar(winbufnr(popup_atcursor(systemlist("cd " . shellescape(fnamemodify(resolve(expand("%:p")), ":h")) . " && git log --no-merges -n 1 -L " . shellescape(line("v") . "," . line(".") . ":" . resolve(expand("%:p")))), { "padding": [1,1,1,1], "pos": "botleft", "wrap": 0 })), "&filetype", "git")<CR>')
-
--- strings used in list mode
--- vim.opt.listchars = 'eol:↲,tab:→,trail:·,extends:▶,precedes:◀'
-
--- restore cursor position
-local function restore_cursor()
- if vim.fn.line("'\"") > 1 and vim.fn.line("'\"") <= vim.fn.line("$") then
- vim.cmd("normal! g'\"")
- end
-end
-vim.api.nvim_create_autocmd({"BufReadPost"}, { callback = restore_cursor })
-
--- start git commits and rebases in insert mode
-vim.api.nvim_create_augroup("bufcheck", { clear = true })
-vim.api.nvim_create_autocmd("FileType", {
- group = "bufcheck",
- pattern = { "gitcommit" },
- command = "startinsert | 1",
-})
-
-require('plugins')
-require('plugin_theme')
-require('plugin_completion') -- also for snippets
-require('go')
-
--- ALE use quickfix window
-vim.g.ale_set_loclist = 0
-vim.g.ale_set_quickfix = 1
-
--- harpoon keybindings
-vim.api.nvim_set_keymap('n','<leader>p', ':lua require("harpoon.mark").add_file()<cr>', { noremap = true, silent = true })
-vim.api.nvim_set_keymap('n','<leader>d', ':lua require("harpoon.mark").rm_file()<cr>', { noremap = true, silent = true })
-vim.api.nvim_set_keymap('n','<leader>h', ':lua require("harpoon.ui").nav_prev()<cr>', { noremap = true, silent = true })
-vim.api.nvim_set_keymap('n','<leader>l', ':lua require("harpoon.ui").nav_next()<cr>', { noremap = true, silent = true })
-vim.api.nvim_set_keymap('n','<leader><leader>', ':lua require("harpoon.ui").toggle_quick_menu()<cr>', { noremap = true, silent = true })
-
-require("harpoon").setup({
- -- sets the marks upon calling `toggle` on the ui, instead of require `:w`.
- save_on_toggle = true,
-
- -- filetypes that you want to prevent from adding to the harpoon list menu.
- excluded_filetypes = { "harpoon" },
-
- -- set marks specific to each git branch inside git repository
- mark_branch = true,
-})
D config/nvim/lua/go.lua => config/nvim/lua/go.lua +0 -7
@@ 1,7 0,0 @@
-vim.g['go_fmt_command'] = "gopls"
-vim.g['go_gopls_gofumpt'] = 1
-vim.g['go_auto_type_info'] = 1
-
--- Custom keybindings from hell
-vim.keymap.set('n', 'gie', '<Cmd>GoIfErr<CR>' )
-vim.keymap.set('n', 'gis', '<Cmd>GoFillStruct<CR>' )
D config/nvim/lua/plugin.theme.lua => config/nvim/lua/plugin.theme.lua +0 -14
@@ 1,14 0,0 @@
-vim.opt.termguicolors = true
-
-require('onedark').setup {
- style = "cool",
- transparent = true,
- code_style = {
- comments = 'italic',
- keywords = 'italic,bold',
- functions = 'none',
- strings = 'none',
- variables = 'none'
- },
-}
-require('onedark').load()
D config/nvim/lua/plugin_completion.lua => config/nvim/lua/plugin_completion.lua +0 -12
@@ 1,12 0,0 @@
-vim.g['deoplete#enable_at_startup'] = 1
-vim.g['deoplete#complete_method'] = "omnifunc"
-
-vim.g['ale_sign_error'] = '❌'
-vim.g['ale_sign_warning'] = '⚠'
-
-vim.cmd [[call deoplete#custom#option('omni_patterns', {'go': '[^. *\t]\.\w*', 'html': ['<', '</', '<[^>]*\s[[:alnum:]-]*'],})]]
-
-vim.api.nvim_set_keymap("i", "<silent><expr><tab>", 'pumvisible() ? "<C-j>" : deoplete#manual_complete()', {noremap=true})
-vim.api.nvim_set_keymap("i", "<silent><expr><tab>", 'pumvisible() ? "<C-j>" : deoplete#manual_complete()', {noremap=true})
-
--- TODO:
D config/nvim/lua/plugin_theme.lua => config/nvim/lua/plugin_theme.lua +0 -14
@@ 1,14 0,0 @@
-vim.opt.termguicolors = true
-
-require('onedark').setup {
- style = "cool",
- transparent = true,
- code_style = {
- comments = 'italic',
- keywords = 'italic,bold',
- functions = 'none',
- strings = 'none',
- variables = 'none'
- },
-}
-require('onedark').load()
D config/nvim/lua/plugins.lua => config/nvim/lua/plugins.lua +0 -114
@@ 1,114 0,0 @@
-local fn = vim.fn
-local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
-if fn.empty(fn.glob(install_path)) > 0 then
- packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
- -- fn.system({'yay', '-Syu', 'go', 'shellcheck', 'python', '--noconfirm'})
- vim.cmd("terminal yay -Syu go shellcheck python --noconfirm")
-end
-
-vim.cmd([[
- augroup packer_user_config
- autocmd!
- autocmd BufWritePost plugins.lua source <afile> | PackerCompile
- augroup end
-]])
-
-return require('packer').startup({function(use)
- use 'wbthomason/packer.nvim'
-
- use 'navarasu/onedark.nvim'
-
- use 'airblade/vim-gitgutter'
-
- use {
- 'kdheepak/tabline.nvim',
- config = function()
- require'tabline'.setup {
- -- Defaults configuration options
- enable = true,
- options = {
- -- If lualine is installed tabline will use separators configured in lualine by default.
- -- These options can be used to override those settings.
- section_separators = {'', ''},
- component_separators = {'', ''},
- max_bufferline_percent = 66, -- set to nil by default, and it uses vim.o.columns * 2/3
- show_tabs_always = false, -- this shows tabs only when there are more than one tab or if the first tab is named
- show_devicons = true, -- this shows devicons in buffer section
- show_bufnr = false, -- this appends [bufnr] to buffer section,
- show_filename_only = false, -- shows base filename only instead of relative path in filename
- modified_icon = "* ", -- change the default modified icon
- modified_italic = false, -- set to true by default; this determines whether the filename turns italic if modified
- show_tabs_only = false, -- this shows only tabs instead of tabs + buffers
- }
- }
- vim.cmd[[
- set guioptions-=e " Use showtabline in gui vim
- set sessionoptions+=tabpages,globals " store tabpages and globals in session
- ]]
- end,
- requires = { { 'hoob3rt/lualine.nvim', opt=true }, {'kyazdani42/nvim-web-devicons', opt = true} }
- }
-
- use {
- 'tpope/vim-dispatch',
- opt = true,
- cmd = {'Dispatch', 'Make', 'Focus', 'Start'}
- }
-
- use {
- 'fatih/vim-go',
- ft = {'go'},
- run = function() vim.cmd([[GoUpdateBinaries]]) end
- }
-
- use {
- 'codelitt/vim-qtpl',
- ft = {'qtpl'},
- }
-
- use {
- 'SirVer/ultisnips',
- ft = {'go'}
- }
- use {
- 'honza/vim-snippets',
- ft = {'go'}
- }
-
- use {
- 'w0rp/ale',
- ft = {'go', 'sh'}
- }
-
- use { 'Shougo/deoplete.nvim' }
- use { 'Shougo/neosnippet.vim' }
- use { 'Shougo/neosnippet-snippets' }
-
- use { 'nvim-lua/plenary.nvim' }
- use { 'ThePrimeagen/harpoon' }
-
- use { 'tommcdo/vim-lion' }
-
- use { 'ThePrimeagen/vim-be-good' }
-
- use { 'lambdalisue/suda.vim' }
-
- use { 'tpope/vim-fugitive' }
-
- use { 'tpope/vim-dadbod' }
- use { 'tpope/vim-commentary' }
- use { 'tpope/vim-eunuch' }
- use { 'tommcdo/vim-lion' }
-
- if packer_bootstrap then
- require('packer').sync()
- vim.fn.PackerInstall()
- end
-end,
-config = {
- display = {
- open_fn = function()
- return require('packer.util').float({ border = 'single' })
- end
- }
-}})