summaryrefslogtreecommitdiffstats
path: root/config/nvim
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2024-01-07 12:00:08 -0500
committerJon Santmyer <jon@jonsantmyer.com>2024-01-07 12:00:08 -0500
commit7b79203f54853733d4fae88943829d0e24e6e49f (patch)
treea352d199fad7453332b9308a6295164157729f27 /config/nvim
parent184bd30bcb303104a4981ac742d8f8961c5477e7 (diff)
downloadnix-config-7b79203f54853733d4fae88943829d0e24e6e49f.tar.gz
nix-config-7b79203f54853733d4fae88943829d0e24e6e49f.tar.bz2
nix-config-7b79203f54853733d4fae88943829d0e24e6e49f.zip
massive overhaul
Diffstat (limited to 'config/nvim')
-rw-r--r--config/nvim/init.lua14
-rw-r--r--config/nvim/init.vim71
-rw-r--r--config/nvim/plugins.lua57
3 files changed, 142 insertions, 0 deletions
diff --git a/config/nvim/init.lua b/config/nvim/init.lua
new file mode 100644
index 0000000..4a80830
--- /dev/null
+++ b/config/nvim/init.lua
@@ -0,0 +1,14 @@
+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",
+ lazypath
+ })
+end
+vim.opt.rtp:prepend(lazypath)
+
+require("lazy").setup("plugins")
diff --git a/config/nvim/init.vim b/config/nvim/init.vim
new file mode 100644
index 0000000..993ea88
--- /dev/null
+++ b/config/nvim/init.vim
@@ -0,0 +1,71 @@
+set termguicolors
+
+filetype plugin indent on
+set tabstop=4 softtabstop=4 shiftwidth=4
+set expandtab smarttab
+set autoindent
+set incsearch ignorecase smartcase hlsearch
+set encoding=utf-8
+set textwidth=0
+set number
+
+set hidden
+set title
+set noshowmode
+set noruler
+set noshowcmd
+
+set nobackup
+set nowritebackup
+
+set updatetime=300
+set signcolumn=yes
+
+let mapleader = "\<Space>"
+
+" Tab-trigger completion
+inoremap <silent><expr> <Tab>
+ \ coc#pum#visible() ? coc#pum#next(1) :
+ \ CheckBackspace() ? "\<Tab>" :
+ \ coc#refresh()
+inoremap <expr><S-Tab> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
+
+inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm() :
+ \ "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
+
+function! CheckBackspace() abort
+ let col = col('.') - 1
+ return !col || getline('.')[col - 1] =~# '\s'
+endfunction
+
+inoremap <silent><expr> <c-space> coc#refresh()
+
+nmap <silent> [g <Plug>(coc-diagnostic-prev)
+nmap <silent> ]g <Plug>(coc-diagnostic-next)
+
+nmap <silent> gd <Plug>(coc-definition)
+nmap <silent> gy <Plug>(coc-type-definition)
+nmap <silent> gi <Plug>(coc-implementation)
+nmap <silent> gr <Plug>(coc-references)
+
+nnoremap <silent> K :call ShowDocumentation()<CR>
+
+function! ShowDocumentation()
+ if CocAction('hasProvider', 'hover')
+ call CocActionAsync('doHover')
+ else
+ call feedkeys('K', 'in')
+ endif
+endfunction
+
+autocmd CursorHold * silent call CocActionAsync('highlight')
+
+" Telescope
+nnoremap <leader>ff <cmd>Telescope find_files<cr>
+nnoremap <leader>fg <cmd>Telescope live_grep<cr>
+nnoremap <leader>fb <cmd>Telescope buffers<cr>
+nnoremap <leader>fh help_tags<cr>
+
+lua require('init')
+
+color catppuccin
diff --git a/config/nvim/plugins.lua b/config/nvim/plugins.lua
new file mode 100644
index 0000000..83c74ad
--- /dev/null
+++ b/config/nvim/plugins.lua
@@ -0,0 +1,57 @@
+return
+{
+ { "neovim/nvim-lspconfig" },
+ { "MordechaiHadad/nvim-lspmanager",
+ dependencies = { "neovim/nvim-lspconfig" },
+ config = function()
+ require('lspmanager').setup({
+ ensure_installed = {
+ "clangd"
+ }
+ })
+ end
+ },
+ { "nvim-treesitter/nvim-treesitter",
+ build = ":TSUpdate",
+ config = function()
+ require('nvim-treesitter.configs').setup{
+ ensure_installed = { "c", "cpp" },
+ auto_install = true,
+ highlight = {
+ enable = true
+ }
+ }
+ end
+ },
+ { "neoclide/coc.nvim", branch="release" },
+ { "nvim-lua/plenary.nvim" },
+ { "nvim-telescope/telescope.nvim", tag = '0.1.3',
+ dependencies = { 'nvim-lua/plenary.nvim' }
+ },
+ { "nvim-tree/nvim-web-devicons" },
+ { "lewis6991/gitsigns.nvim",
+ config = function()
+ require('gitsigns').setup()
+ end
+ },
+ { "tpope/vim-surround" },
+ { "catppuccin/nvim", name="catppuccin", priority=1000 },
+ { "feline-nvim/feline.nvim",
+ config = function()
+ local ctp_feline = require('catppuccin.groups.integrations.feline')
+ require('feline').setup({
+
+ })
+ end
+ },
+ { "romgrk/barbar.nvim",
+ dependencies = {
+ 'lewis6991/gitsigns.nvim',
+ 'nvim-tree/nvim-web-devicons'
+ },
+ init = function() vim.g.barbar_auto_setup = false end,
+ config = function()
+ require('barbar').setup()
+ end
+ }
+}