diff --git a/after/ftplugin/rust.lua b/after/ftplugin/rust.lua deleted file mode 100644 index c996ff2..0000000 --- a/after/ftplugin/rust.lua +++ /dev/null @@ -1 +0,0 @@ -vim.g.rustfmt_autosave = 1 diff --git a/ftplugin/java.vim b/ftplugin/java.vim new file mode 100644 index 0000000..d46f8b0 --- /dev/null +++ b/ftplugin/java.vim @@ -0,0 +1,16 @@ +let g:JavaImpDataDir = $HOME . "/.vim/JavaImp" + +" F7 to call clean redundant Java imports and sort them +function JavaImpClean() + %!~/bin/clean_imports.sh % + :JavaImpSort +endfunction +:command JavaImpClean exec JavaImpClean() +:nnoremap :JavaImpClean + +"let makeprg = 'java -cp /opt/boxen/homebrew/opt/checkstyle/libexec/checkstyle-6.0-all.jar -c '. vimrc_git . '/checkstyle.xml %:p' +let makeprg = 'checkstyle -c '. vimrc_git . '/checkstyle.xml ./%' + +let &makeprg=escape(makeprg, ' ') +setlocal errorformat=%f:%l:\ %m,%f:%l:%v:\ %m,%-G%.%# + diff --git a/ftplugin/javascript.lua b/ftplugin/javascript.lua deleted file mode 100644 index 0c8031d..0000000 --- a/ftplugin/javascript.lua +++ /dev/null @@ -1,3 +0,0 @@ -vim.cmd('setlocal fdm=indent') -vim.cmd('setlocal smartindent') -vim.cmd('setlocal list') diff --git a/ftplugin/javascript.vim b/ftplugin/javascript.vim new file mode 100644 index 0000000..5983860 --- /dev/null +++ b/ftplugin/javascript.vim @@ -0,0 +1,3 @@ +setlocal fdm=indent +setlocal smartindent +setlocal list diff --git a/ftplugin/markdown.lua b/ftplugin/markdown.lua deleted file mode 100644 index 04786ee..0000000 --- a/ftplugin/markdown.lua +++ /dev/null @@ -1,16 +0,0 @@ --- set a smaller indent -local indent = 2 -vim.opt.tabstop = indent -vim.opt.shiftwidth = indent -vim.opt.softtabstop = indent - --- don't hard break text -vim.opt.textwidth = 0 --- keep soft breaks between words -vim.cmd('setlocal linebreak') --- turn list off as it interferes with soft wrapping -vim.cmd('setlocal nolist') --- turn off breaking when typing new text -vim.cmd('setlocal formatoptions-=t') --- turn off line width hint -vim.cmd('setlocal colorcolumn=0') diff --git a/ftplugin/markdown.vim b/ftplugin/markdown.vim new file mode 100644 index 0000000..ee3bfe1 --- /dev/null +++ b/ftplugin/markdown.vim @@ -0,0 +1,8 @@ +" set a smaller indent +setlocal ts=2 + +" and set up the buffer just like a text file +let oldwd = getcwd() +exec "cd ~/.config/nvim/ftplugin" +source text.vim +exec "cd " . oldwd diff --git a/ftplugin/rust.vim b/ftplugin/rust.vim new file mode 100644 index 0000000..4ef03d1 --- /dev/null +++ b/ftplugin/rust.vim @@ -0,0 +1 @@ +let g:rustfmt_autosave = 1 diff --git a/ftplugin/scala.vim b/ftplugin/scala.vim new file mode 100644 index 0000000..b7bbae5 --- /dev/null +++ b/ftplugin/scala.vim @@ -0,0 +1 @@ +au BufWrite * :Autoformat diff --git a/ftplugin/text.lua b/ftplugin/text.lua deleted file mode 100644 index dc8a2cd..0000000 --- a/ftplugin/text.lua +++ /dev/null @@ -1,10 +0,0 @@ --- don't hard break text -vim.opt.textwidth = 0 --- keep soft breaks between words -vim.cmd('setlocal linebreak') --- turn list off as it interferes with soft wrapping -vim.cmd('setlocal nolist') --- turn off breaking when typing new text -vim.cmd('setlocal formatoptions-=t') --- turn off line width hint -vim.cmd('setlocal colorcolumn=0') diff --git a/ftplugin/text.vim b/ftplugin/text.vim new file mode 100644 index 0000000..cc8cab2 --- /dev/null +++ b/ftplugin/text.vim @@ -0,0 +1,10 @@ +" don't hard break text +setlocal tw=0 +" keep soft breaks between words +setlocal linebreak +" turn list off as it interferes with soft wrapping +setlocal nolist +" turn off breaking when typing new text +setlocal formatoptions-=t +" turn off line width hint +setlocal colorcolumn=0 diff --git a/ftplugin/typescript.lua b/ftplugin/typescript.lua deleted file mode 100644 index 94b3d25..0000000 --- a/ftplugin/typescript.lua +++ /dev/null @@ -1,11 +0,0 @@ -vim.g.neoformat_try_node_exe = 1 - --- set a smaller indent -local indent = 2 -vim.opt.tabstop = indent -vim.opt.shiftwidth = indent -vim.opt.softtabstop = indent - -vim.cmd('setlocal fdm=indent') -vim.cmd('setlocal smartindent') -vim.cmd('setlocal list') diff --git a/ftplugin/typescript.vim b/ftplugin/typescript.vim new file mode 100644 index 0000000..b7bbae5 --- /dev/null +++ b/ftplugin/typescript.vim @@ -0,0 +1 @@ +au BufWrite * :Autoformat diff --git a/ftplugin/vimwiki.vim b/ftplugin/vimwiki.vim deleted file mode 120000 index 4d7d231..0000000 --- a/ftplugin/vimwiki.vim +++ /dev/null @@ -1 +0,0 @@ -markdown.vim \ No newline at end of file diff --git a/init.lua b/init.lua deleted file mode 100644 index d744329..0000000 --- a/init.lua +++ /dev/null @@ -1,141 +0,0 @@ -local vimrc_git = os.getenv("HOME") .. "/src/vimrc" --- add to package path to allow use of require() for lua modules -package.path = string.format("%s;%s?.lua", package.path, vimrc_git.."/") - --- it is a big fat key, after all --- N.B. should come before plugins and plugin specific settings -vim.g.mapleader = ' ' - -require("plug") ---vim.cmd("source " .. vimrc_git .. "/plug.lua") -vim.cmd("source " .. vimrc_git .. "/airline.vim") -vim.cmd("source " .. vimrc_git .. "/lsp.vim") -require("mapping") ---vim.cmd("source " .. vimrc_git .. "/mapping.lua") -vim.cmd("source " .. vimrc_git .. "/fzf.vim") -vim.cmd("source " .. vimrc_git .. "/jsonnet.vim") -vim.cmd("source " .. vimrc_git .. "/nerdtree.vim") -vim.cmd("source " .. vimrc_git .. "/wiki.vim") - -if vim.g.neovide then - require("size-matters") -end - --- set up a line number on the current line but relative above and below to --- help with motion commands -vim.opt.number = true -vim.opt.numberwidth = 2 -vim.opt.relativenumber = true - --- even with the nice space/tab autodetect, prefer 4 for tab stops but let file --- type specifics override (for instance a setting of 2 for markdown -vim.opt.tabstop = 4 --- default to folding on syntax -vim.opt.foldmethod = "syntax" --- disable automatic line breaks, rely on visual wrapping instead -vim.opt.textwidth = 0 --- make white space visible, where that matters -vim.opt.list = true - -local function nolist() - vim.opt.list = false -end - --- make white space invisible only in help text -vim.api.nvim_create_autocmd("FileType", { - pattern = "help", - callback = nolist, -}) --- set up folding preferences -vim.opt.fde = "1" --- vim's spelling is smart enough for code, to only check comments -vim.opt.spell = true --- add a hint for long lines -vim.opt.colorcolumn = "120" --- default to expanding tabs, I'm not insane -vim.opt.expandtab = true - --- change buffer behaviors to no longer require changes when hiding a buffer -vim.opt.hidden = true - --- look for vimrc in the current directory as well as $MYVIMRC --- e.g. place .init.lua at the root of a project directory for project specific settings -vim.opt.exrc = true --- make looking for local changes secure -vim.opt.secure = true --- more secure -vim.opt.modelines = 0 --- preserve some context -vim.opt.scrolloff = 3 --- make the cursor a bit easier to follows -vim.opt.cursorline = true --- make search work a bit more like tab completion in bash -vim.opt.incsearch = true -vim.opt.wildmode = "longest:full" -vim.opt. wildmenu = true --- line break handling -vim.opt.linebreak = true -vim.opt.showbreak = "+" --- always on status line -vim.opt.laststatus = 2 - --- let backspace work more naturally -vim.opt.backspace = "start,indent,eol" --- favor modern encoding -vim.opt.enc = "utf-8" --- more readable config for list mode -vim.opt.listchars = {nbsp = '¬', tab = '»·', trail = '·'} --- smarter handling of case during search -vim.opt.ignorecase = true -vim.opt.smartcase = true --- centralize swap to have backup without clutter -vim.opt.directory = os.getenv("HOME") .. "/.var/nvim/swp//" --- and undo -vim.opt.undofile = true -vim.opt.undodir = os.getenv("HOME") .. "/.nvim/undodir" - --- save when moving away -vim.api.nvim_create_autocmd("FocusLost", {pattern = "*", command = "wa"}) - --- make sure to set TERM to xterm-256color in terminal program or app -vim.opt.background = "dark" -vim.opt.termguicolors = true -vim.cmd("colorscheme breezy") -vim.g.airline_theme = "breezy" - --- ensure autoread works, to detect file changes outside the editor -vim.opt.autoread = true -vim.api.nvim_create_autocmd("CursorHold", {pattern = "*", command = "checktime"}) - --- for gui, make it easier to tell different instances apart -vim.opt.title = true - --- keep nvim from resetting font back to default from terminal config -vim.opt.guicursor = nil - -local guiopts = vim.g.guioptions -if guiopts == nil then - guiopts = "" -end -guiopts = guiopts:gsub("r", "") -guiopts = guiopts:gsub("b", "") -guiopts = guiopts:gsub("T", "") -guiopts = guiopts:gsub("m", "") - -vim.g.guioptions = guiopts - -vim.opt.mouse = "nv" - -if vim.loop.os_uname().sysname == 'Linux' then - vim.opt.gfn = "FiraCode Nerd Font Mono:h12" - require('nvim-projectconfig').setup({autocmd=true}) -else - vim.opt.gfn = "FiraCode Nerd Font Mono:h16" - require('nvim-projectconfig').setup() -end - -require("trouble").setup { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below -} diff --git a/init.vim b/init.vim new file mode 100644 index 0000000..a6ee690 --- /dev/null +++ b/init.vim @@ -0,0 +1,129 @@ +" set the directory where vimrc git project is located +let vimrc_git=$HOME . "/src/vimrc" + +" it is a big fat key, after all +" N.B. should come before plugins and plugin specific settings +let mapleader = "\" + +" source aux files also under git control +let oldwd = getcwd() +exec "cd " . vimrc_git +source plug.vim +source airline.vim +source syntastic.vim +source fzf.vim +source rust.vim +source mapping.vim +source jsonnet.vim +source nerdtree.vim +exec "cd " . oldwd + +" set up a line number on the current line but relative above and below to help +" with motion commands +set number +set relativenumber + +" even with the nice space/tab autodetect, prefer 4 for tab stops +" but let file type specifics override (for instance a setting of 2 for markdown +set tabstop=4 +" default to folding on syntax +set foldmethod=syntax +" disable automatic line breaks, rely on visual wrapping instead +set textwidth=0 +" make white space visible, where that matters +set list! +" except for help +autocmd FileType help setlocal nolist +" set up folding preferences +set fde=1 +" vim's spelling is smart enough for code, to only check comments +set spell +" add a hint for long lines +set colorcolumn=120 +" default to expanding tabs, I'm not insane +set expandtab + +" change buffer behaviors to no longer require changes when hiding a buffer +set hidden + +" look for vimrc in the current director as well as $MYVIMRC +set exrc +" make looking for local changes secure +set secure +" more secure +set modelines=0 +" preserve some context +set scrolloff=3 +" make the cursor a bit easier to follows +set cursorline +" make search work a bit more like tab completion in bash +set incsearch +set wildmode=longest:full +set wildmenu +" line break handling +set linebreak +set showbreak=+ +" always on status line +set laststatus=2 + +" let backspace work more naturally +set backspace=start,indent,eol +" favor modern encoding +set enc=utf-8 +" more readable config for list mode +set listchars+=nbsp:¬,tab:»·,trail:· +set listchars-=eol:$ +" smarter handling of case during search +set ignorecase +set smartcase +" centralize swap to have backup without clutter +set directory=$HOME/.var/nvim/swp// +" and undo +set undofile +set undodir=$HOME/.nvim/undodir +" make pastemode more accessible +set pastetoggle= +" save when moving away +au FocusLost * :wa + +" make sure to set TERM to xterm-256color in terminal program or app +colorscheme breezy +set background=light +set termguicolors + +" ensure autoread works, to detect file changes outside the editor +set autoread +au CursorHold * checktime + +" for gui, make it easier to tell different instances apart +set title + +" keep nvim from resetting font back to default from terminal config +set guicursor= + +set guioptions-=r +set guioptions-=b +set guioptions-=T +set guioptions-=m + +set gfn=DejaVu\ Sans\ Mono\ for\ Powerline:h13 +" from https://stackoverflow.com/a/51424640 +let s:fontsize = 13 +function! AdjustFontSize(amount) + let s:fontsize = s:fontsize+a:amount + :execute "set gfn=DejaVu\\ Sans\\ Mono\\ for\\ Powerline:h" . s:fontsize +endfunction + +noremap :call AdjustFontSize(1) +noremap :call AdjustFontSize(-1) +inoremap :call AdjustFontSize(1)a +inoremap :call AdjustFontSize(-1)a + +" override the default location of vimwiki and change to markdown +let g:vimwiki_list = [{'path': '~/Documents/Wiki', 'syntax': 'markdown', 'ext': '.md'}] +let g:vimwiki_dir_link = 'index' + +let g:LanguageClient_serverCommands = { +\ 'rust': ['rust-analyzer'], +\ } + diff --git a/mapping.lua b/mapping.lua deleted file mode 100644 index 894a9c9..0000000 --- a/mapping.lua +++ /dev/null @@ -1,74 +0,0 @@ --- from: https://sharksforarms.dev/posts/neovim-rust/ --- Set completeopt to have a better completion experience --- :help completeopt --- menuone: popup even when there's only one match --- noinsert: Do not insert text until a selection is made --- noselect: Do not select, force user to select one from the menu -vim.opt.completeopt = "menuone,noinsert,noselect" - --- Avoid showing extra messages when using completion -vim.opt.shortmess:append('c') - --- extend timeout to allow time for three character shortcuts -vim.opt.timeoutlen = 2500 - -local opts = { noremap = true, silent = true } - --- toggle gundo's display -vim.keymap.set('n', '', vim.cmd.UndotreeToggle) --- quickly toggle a left, vsplit for an insanely powerful file explorer -vim.keymap.set('n', '', vim.cmd.NERDTreeToggle) -vim.keymap.set('n', '', vim.cmd.NERDTreeFind) --- use similar key, esc, to exit terminal mode -vim.cmd("tnoremap ") - --- Code navigation shortcuts --- from https://github.com/neovim/nvim-lspconfig/blob/master/test/minimal_init.lua#L34 -vim.keymap.set('n', 'ga', vim.lsp.buf.code_action) -vim.keymap.set('n', 'gD', vim.lsp.buf.declaration) -vim.keymap.set('n', 'gd', vim.lsp.buf.definition) -vim.keymap.set('n', 'K', vim.lsp.buf.hover) -vim.keymap.set('n', 'gi', vim.lsp.buf.implementation) -vim.keymap.set('n', '', vim.lsp.buf.signature_help) --- vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, opts) --- vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, opts) -vim.keymap.set('n', 'wl', function() - print(vim.inspect(vim.lsp.buf.list_workspace_folders())) -end, opts) -vim.keymap.set('n', 'D', vim.lsp.buf.type_definition) -vim.keymap.set('n', 'nr', vim.lsp.buf.rename) -vim.keymap.set('n', 'gr', vim.lsp.buf.references) -vim.keymap.set('n', 'e', vim.diagnostic.open_float) -vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) -vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) -vim.keymap.set('n', 'q', vim.diagnostic.setloclist) - - -vim.keymap.set('n', 'xx', vim.cmd.TroubleToggle, opts) -vim.keymap.set('n', 'xw', function() - vim.cmd("TroubleToggle workspace_diagnostics") -end, opts) -vim.keymap.set('n', 'xd', function() - vim.cmd("TroubleToggle workspace_diagnostics") -end, opts) -vim.keymap.set('n', 'xq', function() - vim.cmd("TroubleToggle quickfix") -end, opts) -vim.keymap.set('n', 'xl', function() - vim.cmd("TroubleToggle loclist") -end, opts) --- work with Trouble to view lists of diagnostic warnings/errors - -vim.keymap.set('n', 'wt', function() - vim.cmd("e ~/Documents/Wiki/tags.md") -end, opts) -vim.keymap.set('n', 'tr', vim.cmd.VimwikiRebuildTags, opts) -vim.keymap.set('n', 'tg', vim.cmd.VimwikiGenerateTagLinks, opts) - --- TODO translate to lua ---function! VimwikiFindAllIncompleteTasks() --- lvimgrep /- \[ \]/ * --- lopen ---endfunction - ---nmap wa :call VimwikiFindAllIncompleteTasks() diff --git a/mapping.vim b/mapping.vim new file mode 100644 index 0000000..426f41b --- /dev/null +++ b/mapping.vim @@ -0,0 +1,31 @@ +" quickly clear Syntastic info +nmap :SyntasticReset +" toggle gundo's display +nmap :UndotreeToggle +" quickly toggle a right, vsplit for viewing, navigating whatever structure easy +" tags/tagbar can figure out for the current buffer +nmap :TagbarToggle +" quickly toggle a left, vsplit for an insanely powerful file explorer +nmap :NERDTreeToggle +" open tree to current buffer +nmap :NERDTreeFind +" use similar key, esc, to exit terminal mode +tnoremap + +" from: https://sharksforarms.dev/posts/neovim-rust/ +" Code navigation shortcuts +nnoremap lua vim.lsp.buf.definition() +nnoremap K lua vim.lsp.buf.hover() +nnoremap gD lua vim.lsp.buf.implementation() +nnoremap lua vim.lsp.buf.signature_help() +nnoremap 1gD lua vim.lsp.buf.type_definition() +nnoremap gr lua vim.lsp.buf.references() +nnoremap g0 lua vim.lsp.buf.document_symbol() +nnoremap gW lua vim.lsp.buf.workspace_symbol() +nnoremap gd lua vim.lsp.buf.definition() +nnoremap ga lua vim.lsp.buf.code_action() +nnoremap rn lua vim.lsp.buf.rename() + +" Goto previous/next diagnostic warning/error +nnoremap g[ lua vim.lsp.diagnostic.goto_prev() +nnoremap g] lua vim.lsp.diagnostic.goto_next() diff --git a/plug.lua b/plug.lua deleted file mode 100644 index b9334f7..0000000 --- a/plug.lua +++ /dev/null @@ -1,108 +0,0 @@ -local vim = vim -local Plug = vim.fn['plug#'] - -vim.call('plug#begin') - --- I try to keep these to a minimum and to understand what each plugin does and --- adds to my existing(set up. I try to capture the value, at least to me, each --- plugin adds. I've tried to logically group them, as well, to spot overlap --- and redundancy. - --- dynamic font resizing(using ctl and arrow keys -Plug('tenxsoydev/size-matters.nvim') - --- custom colorscheme -Plug('fneu/breezy') - - --- informational --- lightweight but sophisticated status line -Plug('vim-airline/vim-airline') -Plug('vim-airline/vim-airline-themes') --- visualize vim's undo tree -Plug('mbbill/undotree') --- diagnostics display -Plug('folke/trouble.nvim') --- icons for Trouble -Plug('kyazdani42/nvim-web-devicons') - - --- files, folders, projects, etc. --- file and dir browser -Plug('preservim/nerdtree') --- integrate ripgrep, especially to be able to open matches, hugely useful for --- code aware search -Plug('jremmen/vim-ripgrep') --- Support for the cd replacement, zoxide -Plug('nanotee/zoxide.vim') --- taskwarrior -Plug('xarthurx/taskwarrior.vim') --- Wiki support - my life is in vimwiki -Plug('vimwiki/vimwiki', { ['branch'] = 'dev' }) - - --- git integration -Plug('tpope/vim-fugitive') -Plug('tpope/vim-rhubarb') -Plug('mhinz/vim-signify') --- git support for nerdtree -Plug('Xuyuanp/nerdtree-git-plugin') --- better support for JS -Plug('pangloss/vim-javascript') --- find, complete, etc. on steroids --- fast fuzzy finder -Plug('junegunn/fzf', { ['dir'] = '~/.fzf', ['do'] = function() - vim.fn['fzf#install']() -end }) -Plug('junegunn/fzf.vim') --- auto detect tab and space handling(rather than setting per project -Plug('tpope/vim-sleuth') - - --- tools - all languages --- look for .editorconfig(and merge into vim settings -Plug('editorconfig/editorconfig-vim') --- auto format all the things -Plug('sbdchd/neoformat') --- load config(from $CWD/.config/init.vim -Plug('windwp/nvim-projectconfig') - --- Collection of common configurations for the Nvim LSP client -Plug('neovim/nvim-lspconfig') --- Add commands to add and manage lsp plugins -Plug('williamboman/nvim-lsp-installer') - --- Completion framework --- I found these when updating(my lsp configuration and after using the --- additional sources for a while, find them super useful for general editing --- too --- See hrsh7th's other plugins for more completion sources! -Plug('hrsh7th/nvim-cmp') --- LSP completion source for nvim-cmp -Plug('hrsh7th/cmp-nvim-lsp') --- Snippet completion source for nvim-cmp -Plug('hrsh7th/cmp-vsnip') --- Other useful completion sources -Plug('hrsh7th/cmp-path') -Plug('hrsh7th/cmp-buffer') --- Snippet engine -Plug('hrsh7th/vim-vsnip') - --- allows other programs and scripts to hook into NeoVim's language server --- protocol support; adopted as a pre-requisite for prettier integration -Plug('jose-elias-alvarez/null-ls.nvim') - --- specific languages, programming(and otherwise - --- support for the Rust programming(language -Plug('rust-lang/rust.vim') --- handles Rust configuration for LSP -Plug('mrcjkb/rustaceanvim') - --- support for jsonnet -Plug('google/vim-jsonnet') - --- nvm to make JS/TS/Node easier to work with -Plug('marene/nvm.vim') - -vim.call('plug#end') diff --git a/plug.vim b/plug.vim new file mode 100644 index 0000000..5e505fb --- /dev/null +++ b/plug.vim @@ -0,0 +1,80 @@ +call plug#begin("~/.config/nvim/plugged") + +" look for .editorconfig and merge into vim settings +Plug 'editorconfig/editorconfig-vim' +" file and dir browser +Plug 'preservim/nerdtree' +" git support for nerdtree +Plug 'Xuyuanp/nerdtree-git-plugin' +" syntax checking on steroids +Plug 'scrooloose/syntastic' +" integrate ripgrep, especially to be able to open matches, hugely useful for +" code aware search +Plug 'jremmen/vim-ripgrep' +" lightweight but sophisticated status line +Plug 'vim-airline/vim-airline' +Plug 'vim-airline/vim-airline-themes' +" git integration +Plug 'tpope/vim-fugitive' +Plug 'tpope/vim-rhubarb' +Plug 'mhinz/vim-signify' +" visualize vim's undo tree +Plug 'mbbill/undotree' +" better support for JS +Plug 'pangloss/vim-javascript' +" find, complete, etc. on steroids +" fast fuzzy finder +Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } +Plug 'junegunn/fzf.vim' +" auto detect tab and space handling rather than setting per project +Plug 'tpope/vim-sleuth' + + +" support for the Rust programming language +Plug 'rust-lang/rust.vim' + +" the rest of the rust config came from: https://sharksforarms.dev/posts/neovim-rust/ +" Collection of common configurations for the Nvim LSP client +Plug 'neovim/nvim-lspconfig' + +" Completion framework +Plug 'hrsh7th/nvim-cmp' + +" LSP completion source for nvim-cmp +Plug 'hrsh7th/cmp-nvim-lsp' + +" Snippet completion source for nvim-cmp +Plug 'hrsh7th/cmp-vsnip' + +" Other usefull completion sources +Plug 'hrsh7th/cmp-path' +Plug 'hrsh7th/cmp-buffer' + +" See hrsh7th's other plugins for more completion sources! + +" To enable more of the features of rust-analyzer, such as inlay hints and more! +Plug 'simrat39/rust-tools.nvim' + +" Snippet engine +Plug 'hrsh7th/vim-vsnip' + + +" support for jsonnet +Plug 'google/vim-jsonnet' +" groovy syntax and indent +Plug 'vim-scripts/groovy.vim' +Plug 'vim-scripts/groovyindent-unix' +" auto format all the things +" https://github.com/Chiel92/vim-autoformat +Plug 'Chiel92/vim-autoformat' +" taskwarrior +Plug 'xarthurx/taskwarrior.vim' +" Wiki support +Plug 'vimwiki/vimwiki', { 'branch': 'dev' } +" integrating taskwarrior and vimwiki +Plug 'tools-life/taskwiki' +" Preferred color scheme +Plug 'fneu/breezy' + +" All of your Plugins must be added before the following line +call plug#end() " required diff --git a/projects/leptos.lua b/projects/leptos.lua deleted file mode 100644 index 6c13efa..0000000 --- a/projects/leptos.lua +++ /dev/null @@ -1,18 +0,0 @@ -vim.g.rustaceanvim = { - server = { - default_settings = { - ['rust-analyzer'] = { - cargo = { - features = { - "ssr" - }, - }, - rustfmt = { - overrideCommand = { - "leptosfmt", "--stdin", "--rustfmt" - }, - }, - }, - }, - }, -} diff --git a/projects/text.lua b/projects/text.lua deleted file mode 100644 index 5b75d71..0000000 --- a/projects/text.lua +++ /dev/null @@ -1,3 +0,0 @@ -vim.cmd('colorscheme quiet') -vim.opt.background = "light" -vim.opt.termguicolors = true diff --git a/lsp.vim b/rust.vim similarity index 62% rename from lsp.vim rename to rust.vim index 7f31104..4acbe45 100644 --- a/lsp.vim +++ b/rust.vim @@ -9,8 +9,31 @@ set completeopt=menuone,noinsert,noselect " Avoid showing extra messages when using completion set shortmess+=c -" Recognize slint files -autocmd BufEnter *.slint :setlocal filetype=slint +" Configure LSP through rust-tools.nvim plugin. +" rust-tools will configure and enable certain LSP features for us. +" See https://github.com/simrat39/rust-tools.nvim#configuration +lua <