Browse Source

Wed 31 Aug 2022 06:40:15 ACST

master
Tovi Jaeschke-Rogers 2 years ago
parent
commit
f62be32520
8 changed files with 71 additions and 55 deletions
  1. +0
    -4
      .config/nvim/lua/config/general/autocmd.lua
  2. +3
    -1
      .config/nvim/lua/config/general/options.lua
  3. +20
    -14
      .config/nvim/lua/config/general/remaps.lua
  4. +14
    -12
      .config/nvim/lua/config/lsp/init.lua
  5. +1
    -1
      .config/nvim/lua/config/nvim-neo-tree.lua
  6. +8
    -0
      .config/nvim/lua/config/telescope.lua
  7. +22
    -20
      .config/nvim/lua/packer-plugins.lua
  8. +3
    -3
      .zshrc

+ 0
- 4
.config/nvim/lua/config/general/autocmd.lua View File

@ -14,10 +14,6 @@ local aucmd_dict = {
{
command = [[%s/\s\+$//e]],
},
{
pattern = '*.go',
callback = function () require('go.format').gofmt() end,
},
},
BufRead = {
{


+ 3
- 1
.config/nvim/lua/config/general/options.lua View File

@ -1,4 +1,4 @@
vim.g.mapleader = ','
vim.g.mapleader = ' '
vim.o.clipboard = 'unnamedplus'
@ -26,3 +26,5 @@ vim.o.shiftwidth = 4
vim.o.smarttab = true
vim.o.formatoptions = 'tqj'
vim.cmd[[let g:pdv_cfg_autoEndFunction = 0]]

+ 20
- 14
.config/nvim/lua/config/general/remaps.lua View File

@ -1,5 +1,9 @@
local options = { noremap = true }
-- Source init.lua
vim.api.nvim_set_keymap('n', '<leader>so', '<cmd>source ~/.config/nvim/init.lua<CR>', options)
-- Don't copy "c" changes to primary register
vim.api.nvim_set_keymap('n', 'c', '"_c', options)
-- Easily open splits
@ -10,9 +14,9 @@ vim.api.nvim_set_keymap('n', '<leader>vs', '<cmd>vsplit<cr>', options)
vim.api.nvim_set_keymap('n', '<leader>y', 'ggyG<C-o>', options)
-- Manually store session
vim.api.nvim_set_keymap('n', '<F5>', '<cmd>mksession! ~/.cache//nvim/session/manual_session.vim<cr>', options)
vim.api.nvim_set_keymap('n', '<F5>', '<cmd>mksession! ~/.cache//nvim/session/manual_session.vim<CR>', options)
-- Restore manually stored session
vim.api.nvim_set_keymap('n', '<F6>', '<cmd>source ~/.cache/nvim/session/manual_session.vim<cr>', options)
vim.api.nvim_set_keymap('n', '<F6>', '<cmd>source ~/.cache/nvim/session/manual_session.vim<CR>', options)
-- Restore auto saved session created on exit
vim.api.nvim_set_keymap('n', '<F7>', '<cmd>source ~/.cache/nvim/session/shutdown_session.vim<CR>', options)
@ -27,15 +31,17 @@ vim.api.nvim_set_keymap('v', '<leader><leader>', '<Esc>/<++><Enter>"_c4l', optio
-- Spell-check
vim.api.nvim_set_keymap('n', '<leader>o', '<cmd>setlocal spell! spelllang=en_au<cr>', options)
vim.api.nvim_set_keymap('n', '<A-<>', '<Cmd>BufferMovePrevious<CR>', options)
vim.api.nvim_set_keymap('n', '<A->>', '<Cmd>BufferMoveNext<CR>', options)
vim.api.nvim_set_keymap('n', '<A-1>', '<Cmd>BufferGoto 1<CR>', options)
vim.api.nvim_set_keymap('n', '<A-2>', '<Cmd>BufferGoto 2<CR>', options)
vim.api.nvim_set_keymap('n', '<A-3>', '<Cmd>BufferGoto 3<CR>', options)
vim.api.nvim_set_keymap('n', '<A-4>', '<Cmd>BufferGoto 4<CR>', options)
vim.api.nvim_set_keymap('n', '<A-5>', '<Cmd>BufferGoto 5<CR>', options)
vim.api.nvim_set_keymap('n', '<A-6>', '<Cmd>BufferGoto 6<CR>', options)
vim.api.nvim_set_keymap('n', '<A-7>', '<Cmd>BufferGoto 7<CR>', options)
vim.api.nvim_set_keymap('n', '<A-8>', '<Cmd>BufferGoto 8<CR>', options)
vim.api.nvim_set_keymap('n', '<A-9>', '<Cmd>BufferGoto 9<CR>', options)
-- Keep highlight when indenting
vim.api.nvim_set_keymap('v', '<', '<gv', options)
vim.api.nvim_set_keymap('v', '>', '>gv', options)
vim.api.nvim_set_keymap('n', '<A-1>', '1gt', options)
vim.api.nvim_set_keymap('n', '<A-2>', '2gt', options)
vim.api.nvim_set_keymap('n', '<A-3>', '3gt', options)
vim.api.nvim_set_keymap('n', '<A-4>', '4gt', options)
vim.api.nvim_set_keymap('n', '<A-5>', '5gt', options)
vim.api.nvim_set_keymap('n', '<A-6>', '6gt', options)
vim.api.nvim_set_keymap('n', '<A-7>', '7gt', options)
vim.api.nvim_set_keymap('n', '<A-8>', '8gt', options)
vim.api.nvim_set_keymap('n', '<A-9>', '9gt', options)

+ 14
- 12
.config/nvim/lua/config/lsp/init.lua View File

@ -1,17 +1,17 @@
local M = {}
local servers = {
gopls = {},
html = {},
jsonls = {},
pyright = {},
tsserver = {},
vimls = {},
dartls = {},
dockerls = {},
intelephense = {},
sqlls = {},
volar = {},
'gopls',
'html',
'jsonls',
'pyright',
'tsserver',
'vimls',
'dartls',
'dockerls',
'intelephense',
'sqlls',
'vuels',
}
local function on_attach(client, bufnr)
@ -46,7 +46,9 @@ local opts = {
}
function M.setup()
require("config.lsp.installer").setup(servers, opts)
for _, server_name in ipairs(servers) do
require('lspconfig')[server_name].setup(opts)
end
end
return M

+ 1
- 1
.config/nvim/lua/config/nvim-neo-tree.lua View File

@ -149,7 +149,7 @@ require("neo-tree").setup({
--"thumbs.db"
},
},
follow_current_file = false, -- This will find and focus the file in the active buffer every
follow_current_file = true, -- This will find and focus the file in the active buffer every
-- time the current file is changed while the tree is open.
group_empty_dirs = false, -- when true, empty folders will be grouped together
hijack_netrw_behavior = "open_default", -- netrw disabled, opening a directory opens neo-tree


+ 8
- 0
.config/nvim/lua/config/telescope.lua View File

@ -57,6 +57,14 @@ vim.keymap.set('n', '<C-p>', function()
end
end, options)
vim.keymap.set('n', '<leader>df', function()
require("telescope.builtin").find_files({
prompt_title = "< VimRC >",
cwd = vim.fn.expand('~/.config/nvim'),
hidden = true,
})
end, options)
-- vim.keymap.set('n', '<C-q>', function()
-- end, options)


+ 22
- 20
.config/nvim/lua/packer-plugins.lua View File

@ -8,10 +8,10 @@ return require('packer').startup(function()
use { 'neoclide/coc.nvim', run = 'yarn install', disable = true }
use { "williamboman/nvim-lsp-installer" }
use { 'SirVer/ultisnips' }
use { 'rcarriga/nvim-notify' }
use {
"neovim/nvim-lspconfig",
event = "BufReadPre",
@ -58,6 +58,8 @@ return require('packer').startup(function()
disable = false,
}
use 'tpope/vim-fugitive'
use 'nvim-lua/popup.nvim'
use 'nvim-lua/plenary.nvim'
use {
@ -79,13 +81,13 @@ return require('packer').startup(function()
use { 'nvim-treesitter/nvim-treesitter' }
use {
'romgrk/barbar.nvim',
requires = {'kyazdani42/nvim-web-devicons'},
config = function()
require('config.barbar')
end
}
-- use {
-- 'romgrk/barbar.nvim',
-- requires = {'kyazdani42/nvim-web-devicons'},
-- config = function()
-- require('config.barbar')
-- end
-- }
use {
'lewis6991/gitsigns.nvim',
@ -102,13 +104,13 @@ return require('packer').startup(function()
end
}
use {
'ray-x/go.nvim',
config = function()
require('config.go')
'crispgm/nvim-go',
config = function ()
require('config.nvim-go')
end
}
use {'ray-x/guihua.lua', run = 'cd lua/fzy && make'}
use {
'aserowy/tmux.nvim',
@ -130,13 +132,13 @@ return require('packer').startup(function()
end
}
use {
"startup-nvim/startup.nvim",
requires = {"nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim"},
config = function()
require"startup".setup()
end
}
-- use {
-- "startup-nvim/startup.nvim",
-- requires = {"nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim"},
-- config = function()
-- require"startup".setup()
-- end
-- }
-- Local nvim plugin development
-- use '~/Software/nvim-phpdoc/phpdoc.nvim'


+ 3
- 3
.zshrc View File

@ -6,9 +6,9 @@
# and zshoptions(1) for more details.
# set PATH so it includes user's private bin if it exists
# if [ -d "$HOME/.local/bin" ] ; then
# PATH="$PATH:$(du "$HOME/.local/bin/" | cut -f2 | tr '\n' ':')"
# fi
if [ -d "$HOME/.local/bin" ] ; then
PATH="$PATH:$(du "$HOME/.local/bin/" | cut -f2 | tr '\n' ':')"
fi
#if [ -d "$HOME/.local/share/gem/ruby/3.0.0/bin" ]; then
# PATH="$PATH:$HOME/.local/share/gem/ruby/3.0.0/bin"


Loading…
Cancel
Save