This commit is contained in:
Joel Beckmeyer 2023-07-21 15:46:33 -04:00
parent 55be89bfb4
commit e766144286
3 changed files with 115 additions and 0 deletions

View File

@ -0,0 +1,9 @@
{
"coc.preferences.extensionUpdateCheck": "daily",
"workspace.ignoredFolders": [
"$HOME",
"$HOME/.cargo/**",
"$HOME/.rustup/**"
],
"rust-analyzer.server.path": "rust-analyzer"
}

75
dot_config/nvim/init.lua Normal file
View File

@ -0,0 +1,75 @@
require('plugins')
vim.g.netrw_liststyle = 3
-- Use number column
vim.opt.number = true
-- Color column for 80 characters
vim.opt.cc = "80"
-- REMAPS --
-- Use ; in place of : in normal mode
vim.keymap.set('n', ';', ':')
-- Remap navigation between windows
vim.keymap.set('n', '<C-H>', '<C-W><C-H>')
vim.keymap.set('n', '<C-J>', '<C-W><C-J>')
vim.keymap.set('n', '<C-K>', '<C-W><C-K>')
vim.keymap.set('n', '<C-L>', '<C-W><C-L>')
-- Map copy to system clipboard to <C-c>
vim.keymap.set('', '<C-c>', '"+y<CR>')
-- coc.nvim - remap <cr> to make it confirm completion.
vim.keymap.set('i', '<cr>', function()
if vim.fn['coc#pum#visible']() == 1 then return vim.fn['coc#pum#confirm']() end
return '<cr>'
end, { expr=true })
-- coc.nvim - use <Tab> / <S-Tab> to navigate completion list
vim.keymap.set('i', '<Tab>', function()
if vim.fn['coc#pum#visible']() == 1 then return vim.fn['coc#pum#next'](1) end
return '<Tab>'
end, { expr=true })
vim.keymap.set('i', '<S-Tab>', function()
if vim.fn['coc#pum#visible']() == 1 then return vim.fn['coc#pum#prev'](1) end
return '<S-Tab>'
end, { expr=true })
-- Tab stuff
vim.opt.shiftwidth = 2
vim.opt.softtabstop = 2
vim.opt.tabstop = 2
-- set filetype for void-packages templates
vim.api.nvim_create_autocmd(
{ "BufRead", "BufNewFile" },
{ pattern = { "template" }, command = "setlocal filetype=sh" }
)
-- treesitter
require'nvim-treesitter.configs'.setup {
highlight = {
enable = true,
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
indent = {
enable = true
}
}
-- Turn on nice things
vim.opt.clipboard = "unnamedplus"
vim.opt.mouse = "a"
-- Colorscheme
vim.opt.termguicolors = true
vim.o.background = "light"
vim.g.gruvbox_contrast_light = "medium"
vim.g.gruvbox_italicize_comments = 0
vim.cmd([[colorscheme gruvbox]])

View File

@ -0,0 +1,31 @@
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})
end
-- Only required if you have packer configured as `opt`
vim.cmd [[packadd packer.nvim]]
return require('packer').startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
-- LSP / COMPLETION --
use {'neoclide/coc.nvim', branch = "release"}
-- Gruvbox colorscheme
use 'ellisonleao/gruvbox.nvim'
use 'lukas-reineke/indent-blankline.nvim'
use {'nvim-treesitter/nvim-treesitter', run = ':TSUpdate'}
-- Automatically set up your configuration after cloning packer.nvim
-- Put this at the end after all plugins
if packer_bootstrap then
require('packer').sync()
end
end)
-- This file can be loaded by calling `lua require('plugins')` from your init.vim