update plugins

This commit is contained in:
Josh Hamill 2024-09-10 13:43:42 -04:00
parent c2a823647b
commit 55af7a574c
3 changed files with 187 additions and 30 deletions

View File

@ -68,5 +68,68 @@
"</execution>" "</execution>"
], ],
"description": "Maven POM Plugin Execution" "description": "Maven POM Plugin Execution"
},
"Google Format Plugin": {
"prefix": "mvnfmt",
"body": [
"<plugin>",
" <groupId>com.coveo</groupId>",
" <artifactId>fmt-maven-plugin</artifactId>",
" <version>${fmt-maven-plugin.version}</version>",
" <executions>",
" <execution>",
" <id>google-java-format</id>",
" <goals>",
" <goal>check</goal>",
" <!-- <goal>format</goal> -->",
" </goals>",
" </execution>",
" </executions>",
"</plugin>"
],
"description": "Google Format Plugin"
},
"Shade Plugin": {
"prefix": "mvnshade",
"body": [
"<plugin>",
" <groupId>org.apache.maven.plugins</groupId>",
" <artifactId>maven-shade-plugin</artifactId>",
" <version>${maven-shade-plugin.version}</version>",
" <configuration>",
" <createDependencyReducedPom>true</createDependencyReducedPom>",
" <filters>",
" <filter>",
" <artifact>*:*</artifact>",
" <excludes>",
" <exclude>META-INF/*.SF</exclude>",
" <exclude>META-INF/*.DSA</exclude>",
" <exclude>META-INF/*.RSA</exclude>",
" </excludes>",
" </filter>",
" </filters>",
" </configuration>",
" <executions>",
" <execution>",
" <id>shade</id>",
" <phase>package</phase>",
" <goals>",
" <goal>shade</goal>",
" </goals>",
" <configuration>",
" <transformers>",
" <transformer",
" implementation=\"org.apache.maven.plugins.shade.resource.ServicesResourceTransformer\"/>",
" <transformer",
" implementation=\"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer\">",
" <mainClass>${mainClass}</mainClass>",
" </transformer>",
" </transformers>",
" </configuration>",
" </execution>",
" </executions>",
"</plugin>"
],
"description": "Maven Shade Plugin"
} }
} }

3
ftplugin/tf.lua Normal file
View File

@ -0,0 +1,3 @@
vim.opt.tabstop = 2
vim.opt.softtabstop = 2
vim.opt.shiftwidth = 2

151
init.lua
View File

@ -93,6 +93,9 @@ vim.g.maplocalleader = ' '
-- Set to true if you have a Nerd Font installed -- Set to true if you have a Nerd Font installed
vim.g.have_nerd_font = true vim.g.have_nerd_font = true
-- disable some key in sql extensions
vim.g.ftplugin_sql_omni_key = '<C-j>'
-- [[ Setting options ]] -- [[ Setting options ]]
-- See `:help vim.opt` -- See `:help vim.opt`
-- NOTE: You can change these options as you wish! -- NOTE: You can change these options as you wish!
@ -141,6 +144,7 @@ vim.opt.splitbelow = false
-- and `:help 'listchars'` -- and `:help 'listchars'`
vim.opt.list = true vim.opt.list = true
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' } vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' }
vim.keymap.set('n', '<leader><Tab><Tab>', ':set invlist<CR>', { desc = 'Toggle list chars' })
-- Preview substitutions live, as you type! -- Preview substitutions live, as you type!
vim.opt.inccommand = 'split' vim.opt.inccommand = 'split'
@ -157,6 +161,8 @@ vim.opt.shiftwidth = 4
vim.opt.smarttab = true vim.opt.smarttab = true
vim.opt.expandtab = true vim.opt.expandtab = true
vim.opt.foldenable = false
-- [[ Basic Keymaps ]] -- [[ Basic Keymaps ]]
-- See `:help vim.keymap.set()` -- See `:help vim.keymap.set()`
@ -367,6 +373,7 @@ require('lazy').setup({
-- Enable telescope extensions, if they are installed -- Enable telescope extensions, if they are installed
pcall(require('telescope').load_extension, 'fzf') pcall(require('telescope').load_extension, 'fzf')
pcall(require('telescope').load_extension, 'ui-select') pcall(require('telescope').load_extension, 'ui-select')
pcall(require('telescope').load_extension, 'rest')
-- See `:help telescope.builtin` -- See `:help telescope.builtin`
local builtin = require 'telescope.builtin' local builtin = require 'telescope.builtin'
@ -523,6 +530,8 @@ require('lazy').setup({
end, end,
}) })
vim.lsp.set_log_level 'off'
-- LSP servers and clients are able to communicate to each other what features they support. -- LSP servers and clients are able to communicate to each other what features they support.
-- By default, Neovim doesn't support everything that is in the LSP Specification. -- By default, Neovim doesn't support everything that is in the LSP Specification.
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities. -- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
@ -541,7 +550,18 @@ require('lazy').setup({
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
local servers = { local servers = {
clangd = {}, clangd = {},
gopls = {}, gopls = {
settings = {
gopls = {
buildFlags = { '-tags=wireinject' },
standaloneTags = {
'ignore',
'wireinject',
'!wireinject',
},
},
},
},
rust_analyzer = {}, rust_analyzer = {},
tsserver = {}, tsserver = {},
@ -620,8 +640,10 @@ require('lazy').setup({
-- You can use a sub-list to tell conform to run *until* a formatter -- You can use a sub-list to tell conform to run *until* a formatter
-- is found. -- is found.
java = { 'google-java-format' }, java = { 'google-java-format' },
javascript = { 'prettier' }, javascript = { 'eslint_d', 'prettier' },
typescript = { 'prettier' }, javascriptreact = { 'eslint_d', 'prettier' },
typescript = { 'eslint_d', 'prettier' },
typescriptreact = { 'eslint_d', 'prettier' },
go = { 'gofmt', 'goimports', 'golines', 'gofumpt' }, go = { 'gofmt', 'goimports', 'golines', 'gofumpt' },
}, },
}, },
@ -722,6 +744,13 @@ require('lazy').setup({
{ name = 'path' }, { name = 'path' },
}, },
} }
cmp.setup.filetype({ 'sql', 'sqlite', 'mysql' }, {
sources = {
{ name = 'vim-dadbod-completion' },
{ name = 'buffer' },
},
})
end, end,
}, },
@ -730,15 +759,23 @@ require('lazy').setup({
-- change the command in the config to whatever the name of that colorscheme is -- change the command in the config to whatever the name of that colorscheme is
-- --
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme` -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`
'catppuccin/nvim', -- 'catppuccin/nvim',
name = 'catppuccin', -- name = 'catppuccin',
lazy = false, -- make sure we load this during startup if it is your main colorscheme -- lazy = false, -- make sure we load this during startup if it is your main colorscheme
priority = 1000, -- make sure to load this before all the other start plugins -- priority = 1000, -- make sure to load this before all the other start plugins
-- config = function()
-- -- Load the colorscheme here
-- vim.cmd.colorscheme 'catppuccin-mocha'
-- -- You can configure highlights by doing something like
-- vim.cmd.hi 'Comment gui=none'
-- end,
-- },
--
-- {
'ellisonleao/gruvbox.nvim',
priority = 1000,
config = function() config = function()
-- Load the colorscheme here vim.cmd.colorscheme 'gruvbox'
vim.cmd.colorscheme 'catppuccin-mocha'
-- You can configure highlights by doing something like
vim.cmd.hi 'Comment gui=none'
end, end,
}, },
@ -842,26 +879,8 @@ require('lazy').setup({
}, },
{ 'lewis6991/gitsigns.nvim' }, { 'lewis6991/gitsigns.nvim' },
{
'nvim-tree/nvim-tree.lua',
config = function()
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
require('nvim-tree').setup {
view = {
adaptive_size = true,
},
filters = {
dotfiles = true,
},
}
vim.keymap.set('n', '<C-n>', ':NvimTreeFindFileToggle<CR>')
end,
},
{ 'simrat39/symbols-outline.nvim' }, { 'simrat39/symbols-outline.nvim' },
{ 'github/copilot.vim' }, -- { 'github/copilot.vim' },
{ {
'alexghergh/nvim-tmux-navigation', 'alexghergh/nvim-tmux-navigation',
config = function() config = function()
@ -879,7 +898,79 @@ require('lazy').setup({
end, end,
}, },
{ 'mfussenegger/nvim-jdtls' }, { 'mfussenegger/nvim-jdtls' },
{
'nvim-neo-tree/neo-tree.nvim',
version = '*',
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
'MunifTanjim/nui.nvim',
},
config = function()
require('neo-tree').setup {}
vim.keymap.set('n', '<C-n>', ':Neotree toggle<CR>')
end,
},
{
'junegunn/goyo.vim',
config = function()
vim.g.goyo_width = 120
vim.keymap.set('n', '<leader>z', ':Goyo<CR>')
end,
},
{ 'tpope/vim-dadbod' },
{ 'kristijanhusak/vim-dadbod-completion' },
{ 'kristijanhusak/vim-dadbod-ui' },
{
'stevearc/oil.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
config = function()
require('oil').setup {
columns = { 'icon' },
keymaps = {
['<C-h>'] = false,
['<M-h>'] = 'actions.select_split',
view_options = {
show_hidden = true,
},
},
}
vim.keymap.set('n', '-', ':Oil<CR>', { desc = 'Open parent directory' })
vim.keymap.set('n', '<leader>-', require('oil').toggle_float)
end,
},
{ 'tpope/vim-dotenv' },
{
'vhyrro/luarocks.nvim',
priority = 1000,
config = true,
opts = {
rocks = { 'lua-curl', 'nvim-nio', 'mimetypes', 'xml2lua' },
},
},
{
'rest-nvim/rest.nvim',
ft = 'http',
dependencies = { 'luarocks.nvim' },
config = function()
require('rest-nvim').setup {
env_file = '.env',
env_pattern = '\\.env$',
env_edit_command = 'tabedit',
keybinds = {
{
'<leader>rr',
'<cmd>Rest run<cr>',
'Run request under cursor',
},
},
}
vim.keymap.set('n', '<leader>se', require('telescope').extensions.rest.select_env, { desc = '[S]elect [E]nvironment file' })
end,
},
-- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the -- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the
-- init.lua. If you want these files, they are in the repository, so you can just download them and -- init.lua. If you want these files, they are in the repository, so you can just download them and
-- put them in the right spots if you want. -- put them in the right spots if you want.