local map = vim.api.nvim_set_keymap local o = vim.o local cmd = vim.cmd cmd("set nolist"); cmd("set ruler"); cmd("set mouse="); cmd("set t_Co=256"); -- Theme / overrides cmd("colorscheme vacme"); cmd("hi Normal ctermbg=none ctermfg=none"); cmd("hi SignColumn none"); cmd("hi LineNr none"); cmd("hi Search cterm=none ctermbg=yellow"); require("compe").setup { enabled = true, autocomplete = true, source = { path = true, buffer = true, calc = true, nvim_lsp = true, nvim_lua = true, vsnip = true, ultisnips = true, luasnip = true, }, } local telescope = require('telescope') telescope.load_extension('manix') telescope.load_extension('fzf') require("nvim-tree").setup({ renderer = { icons = { webdev_colors = false, show = { file = false, folder = false, folder_arrow = false, git = true, }, }, }, }) require('obsidian').setup({ dir = "~/Brain", daily_notes = { folder = "Daily", }, completion = { nvim_cmp = false, } }) require 'nvim-treesitter.configs'.setup({}) require('neogen').setup({}) require('todo-comments').setup {}; cmd [[highlight NvimTreeOpenedFolderName guifg=default]] cmd [[highlight NvimTreeFolderName guifg=default]] local lspc = require('lspconfig') lspc.elmls.setup {}; lspc.gopls.setup {}; lspc.hls.setup {}; lspc.lua_ls.setup { settings = { Lua = { diagnostics = { globals = {'vim'}, }, }, }, }; lspc.nil_ls.setup {}; lspc.perlpls.setup {}; lspc.solargraph.setup {}; lspc.tsserver.setup {}; lspc.zls.setup {}; o.hlsearch = true; map('n', '', ':NvimTreeToggle', { noremap = true }) map('n', '', ':Files', { noremap = true }) map('n', 'r', ':NvimTreeRefresh', { noremap = true }) map('n', 'n', ':Neogen', { noremap = true }) map('n', 's', ':%s/\\s\\+$//e', { noremap = true }) map('n', 'fm', ':Telescope manix', {}) map('n', 'mo', ':MindOpenMain', {}) map('n', 'mp', ':MindOpenProject', {}) map('n', 'ot', ':ObsidianToday', {}) map('n', 'tb', ':TagbarToggle', {}) map('n', 't', ':TodoQuickFix', {}) map('n', 'g', ':GitGutterToggle', { noremap = true }) map('n', '2', ':set list!', { noremap = true }) map('n', '3', ':set nu!', { noremap = true }) map('n', '4', ':set paste!', { noremap = true }) local builtin = require('telescope.builtin') vim.keymap.set('n', 'ff', builtin.find_files, {}) vim.keymap.set('n', 'fg', builtin.live_grep, {}) vim.keymap.set('n', 'fb', builtin.buffers, {}) vim.keymap.set('n', 'fh', builtin.help_tags, {}) vim.g["vim_markdown_folding_disabled"] = 1 vim.g["elm_setup_keybindings"] = 0 vim.keymap.set('n', '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', 'q', vim.diagnostic.setloclist) vim.api.nvim_create_autocmd('LspAttach', { 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', 'D', vim.lsp.buf.type_definition, opts) vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts) vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts) vim.keymap.set('n', 'f', function() vim.lsp.buf.format { async = true } end, opts) end, }) vim.g.tagbar_type_elm = { ctagstype = 'elm', 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' } } vim.g.tagbar_type_typescript = { ctagstype = 'typescript', kinds = { 'c:classes', 'n:modules', 'f:functions', 'v:variables', 'v:varlambdas', 'm:members', 'i:interfaces', 'e:enums' } }