2022-08-25 12:21:35 -06:00
|
|
|
local map = vim.api.nvim_set_keymap
|
|
|
|
local o = vim.o
|
|
|
|
local cmd = vim.cmd
|
|
|
|
|
|
|
|
cmd("set nolist");
|
|
|
|
cmd("set ruler");
|
2022-12-20 05:16:41 -07:00
|
|
|
cmd("set mouse=");
|
2022-10-26 10:19:10 -06:00
|
|
|
cmd("set t_Co=256");
|
2023-05-26 05:43:04 -06:00
|
|
|
|
|
|
|
-- Theme / overrides
|
2022-10-26 10:19:10 -06:00
|
|
|
cmd("colorscheme vacme");
|
2023-05-26 05:43:04 -06:00
|
|
|
cmd("hi Normal ctermbg=none ctermfg=none");
|
|
|
|
cmd("hi SignColumn none");
|
|
|
|
cmd("hi LineNr none");
|
|
|
|
cmd("hi Search cterm=none ctermbg=yellow");
|
2022-08-25 12:21:35 -06:00
|
|
|
|
|
|
|
require("compe").setup {
|
2023-06-08 21:15:34 -06:00
|
|
|
enabled = true,
|
|
|
|
autocomplete = true,
|
2023-01-16 06:43:06 -07:00
|
|
|
source = {
|
2023-06-08 21:15:34 -06:00
|
|
|
path = true,
|
|
|
|
buffer = true,
|
|
|
|
calc = true,
|
|
|
|
nvim_lsp = true,
|
|
|
|
nvim_lua = true,
|
|
|
|
vsnip = true,
|
|
|
|
ultisnips = true,
|
|
|
|
luasnip = true,
|
|
|
|
},
|
2022-08-25 12:21:35 -06:00
|
|
|
}
|
|
|
|
|
2023-01-04 13:31:51 -07:00
|
|
|
local telescope = require('telescope')
|
|
|
|
telescope.load_extension('manix')
|
|
|
|
telescope.load_extension('fzf')
|
|
|
|
|
2022-10-19 08:13:26 -06:00
|
|
|
require("nvim-tree").setup({
|
2023-01-16 06:43:06 -07:00
|
|
|
renderer = {
|
|
|
|
icons = {
|
|
|
|
webdev_colors = false,
|
|
|
|
show = {
|
|
|
|
file = false,
|
|
|
|
folder = false,
|
|
|
|
folder_arrow = false,
|
|
|
|
git = true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2022-10-19 08:13:26 -06:00
|
|
|
})
|
|
|
|
|
2023-06-16 11:04:01 -06:00
|
|
|
require('obsidian').setup({
|
2023-06-08 21:15:34 -06:00
|
|
|
dir = "~/Brain",
|
|
|
|
daily_notes = {
|
|
|
|
folder = "Daily",
|
|
|
|
},
|
|
|
|
completion = {
|
|
|
|
nvim_cmp = false,
|
|
|
|
}
|
2023-01-18 15:48:33 -07:00
|
|
|
})
|
2023-01-16 06:43:06 -07:00
|
|
|
|
2023-06-08 21:15:34 -06:00
|
|
|
require 'nvim-treesitter.configs'.setup({})
|
2023-01-23 17:30:06 -07:00
|
|
|
require('neogen').setup({})
|
|
|
|
|
2023-06-16 11:04:01 -06:00
|
|
|
require('todo-comments').setup {};
|
|
|
|
|
2023-01-16 06:43:06 -07:00
|
|
|
cmd [[highlight NvimTreeOpenedFolderName guifg=default]]
|
|
|
|
cmd [[highlight NvimTreeFolderName guifg=default]]
|
2022-10-07 20:07:26 -06:00
|
|
|
|
2023-06-16 11:04:01 -06:00
|
|
|
local lspc = require('lspconfig')
|
2023-05-13 12:49:44 -06:00
|
|
|
lspc.elmls.setup {};
|
2022-08-25 12:21:35 -06:00
|
|
|
lspc.gopls.setup {};
|
2023-05-19 14:39:14 -06:00
|
|
|
lspc.hls.setup {};
|
2023-06-16 11:04:17 -06:00
|
|
|
lspc.lua_ls.setup {
|
|
|
|
settings = {
|
|
|
|
Lua = {
|
|
|
|
diagnostics = {
|
|
|
|
globals = {'vim'},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2023-05-13 12:49:44 -06:00
|
|
|
lspc.nil_ls.setup {};
|
|
|
|
lspc.perlpls.setup {};
|
2023-01-18 05:37:39 -07:00
|
|
|
lspc.solargraph.setup {};
|
2023-05-02 11:21:07 -06:00
|
|
|
lspc.tsserver.setup {};
|
|
|
|
lspc.zls.setup {};
|
2022-08-25 12:21:35 -06:00
|
|
|
|
|
|
|
o.hlsearch = true;
|
|
|
|
|
2023-01-16 06:43:06 -07:00
|
|
|
map('n', '<C-n>', ':NvimTreeToggle<CR>', { noremap = true })
|
|
|
|
map('n', '<C-p>', ':Files<CR>', { noremap = true })
|
|
|
|
map('n', '<leader>r', ':NvimTreeRefresh<CR>', { noremap = true })
|
2023-01-23 17:30:06 -07:00
|
|
|
map('n', '<leader>n', ':Neogen<CR>', { noremap = true })
|
2023-01-16 06:43:06 -07:00
|
|
|
map('n', '<leader>s', ':%s/\\s\\+$//e', { noremap = true })
|
|
|
|
map('n', '<leader>fm', ':Telescope manix<CR>', {})
|
2023-01-18 13:00:25 -07:00
|
|
|
map('n', '<leader>mo', ':MindOpenMain<CR>', {})
|
|
|
|
map('n', '<leader>mp', ':MindOpenProject<CR>', {})
|
2023-01-18 15:48:33 -07:00
|
|
|
map('n', '<leader>ot', ':ObsidianToday<CR>', {})
|
2023-06-09 07:23:57 -06:00
|
|
|
map('n', '<leader>tb', ':TagbarToggle<CR>', {})
|
2023-06-16 11:04:01 -06:00
|
|
|
map('n', '<leader>t', ':TodoQuickFix<CR>', {})
|
2023-01-16 06:43:06 -07:00
|
|
|
|
2023-04-17 10:52:09 -06:00
|
|
|
map('n', '<leader>g', ':GitGutterToggle<CR>', { noremap = true })
|
2023-01-16 06:43:06 -07:00
|
|
|
map('n', '<leader>2', ':set list!<CR>', { noremap = true })
|
|
|
|
map('n', '<leader>3', ':set nu!<CR>', { noremap = true })
|
|
|
|
map('n', '<leader>4', ':set paste!<CR>', { noremap = true })
|
2022-10-07 20:07:26 -06:00
|
|
|
|
2023-01-16 06:43:06 -07:00
|
|
|
local builtin = require('telescope.builtin')
|
|
|
|
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
|
|
|
|
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
|
|
|
|
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
|
|
|
|
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
|
2023-03-23 15:22:03 -06:00
|
|
|
|
|
|
|
vim.g["vim_markdown_folding_disabled"] = 1
|
2023-03-28 14:21:27 -06:00
|
|
|
vim.g["elm_setup_keybindings"] = 0
|
2023-05-02 19:40:44 -06:00
|
|
|
|
|
|
|
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float)
|
|
|
|
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev)
|
|
|
|
vim.keymap.set('n', ']d', vim.diagnostic.goto_next)
|
|
|
|
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist)
|
|
|
|
|
2023-06-01 07:27:03 -06:00
|
|
|
vim.api.nvim_create_autocmd('LspAttach', {
|
2023-06-08 21:15:34 -06:00
|
|
|
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
|
|
|
|
callback = function(ev)
|
|
|
|
local opts = { buffer = ev.buf }
|
|
|
|
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
|
|
|
|
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, opts)
|
|
|
|
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, opts)
|
|
|
|
vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts)
|
|
|
|
vim.keymap.set('n', '<space>f', function()
|
|
|
|
vim.lsp.buf.format { async = true }
|
|
|
|
end, opts)
|
|
|
|
end,
|
2023-06-01 07:27:03 -06:00
|
|
|
})
|
2023-06-09 07:23:57 -06:00
|
|
|
|
|
|
|
vim.g.tagbar_type_elm = {
|
2023-06-09 09:40:20 -06:00
|
|
|
ctagstype = 'elm',
|
2023-06-09 07:23:57 -06:00
|
|
|
kinds = {
|
|
|
|
'f:function:0:0',
|
|
|
|
'm:modules:0:0',
|
|
|
|
'i:imports:1:0',
|
|
|
|
't:types:1:0',
|
|
|
|
'a:type aliases:0:0',
|
|
|
|
'c:type constructors:0:0',
|
|
|
|
'p:ports:0:0',
|
|
|
|
's:functions:0:0'
|
|
|
|
}
|
|
|
|
}
|
2023-06-09 09:40:20 -06:00
|
|
|
|
|
|
|
vim.g.tagbar_type_typescript = {
|
|
|
|
ctagstype = 'typescript',
|
|
|
|
kinds = {
|
|
|
|
'c:classes',
|
|
|
|
'n:modules',
|
|
|
|
'f:functions',
|
|
|
|
'v:variables',
|
|
|
|
'v:varlambdas',
|
|
|
|
'm:members',
|
|
|
|
'i:interfaces',
|
|
|
|
'e:enums'
|
|
|
|
}
|
|
|
|
}
|