Ran luaformat on all neovim files, removed unneeded files
This commit is contained in:
parent
1df85d3a12
commit
fa8e0e7331
11 changed files with 277 additions and 285 deletions
|
@ -12,8 +12,9 @@ require('jdtls').start_or_attach({
|
|||
'java.base/java.util=ALL-UNNAMED', '--add-opens',
|
||||
'java.base/java.lang=ALL-UNNAMED', '-jar', nvim_local_dir ..
|
||||
'/mason/packages/jdtls/plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar',
|
||||
'-configuration', nvim_local_dir .. '/mason/packages/jdtls/config_linux',
|
||||
'-data', workspace_dir
|
||||
'-configuration',
|
||||
nvim_local_dir .. '/mason/packages/jdtls/config_linux', '-data',
|
||||
workspace_dir
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
require 'common'
|
||||
|
||||
MapKey('n', 'q', '<cmd>q<CR>')
|
||||
--vim.cmd('set nomodifiable')
|
||||
-- vim.cmd('set nomodifiable')
|
||||
|
|
|
@ -14,7 +14,7 @@ return function()
|
|||
snippet = {
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
end,
|
||||
end
|
||||
},
|
||||
mapping = {
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||
|
@ -25,7 +25,7 @@ return function()
|
|||
['<C-e>'] = cmp.mapping.close(),
|
||||
['<CR>'] = cmp.mapping.confirm {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
select = true
|
||||
},
|
||||
['<Tab>'] = function(fallback)
|
||||
if cmp.visible() then
|
||||
|
@ -44,24 +44,18 @@ return function()
|
|||
else
|
||||
fallback()
|
||||
end
|
||||
end,
|
||||
end
|
||||
},
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'path' },
|
||||
{ name = 'git' },
|
||||
{ name = 'buffer' },
|
||||
},
|
||||
{name = 'nvim_lsp'}, {name = 'luasnip'}, {name = 'path'},
|
||||
{name = 'git'}, {name = 'buffer'}
|
||||
}
|
||||
}
|
||||
|
||||
-- Enable autopairs when enter is processed
|
||||
-- on completion
|
||||
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
|
||||
cmp.event:on(
|
||||
'confirm_done',
|
||||
cmp_autopairs.on_confirm_done()
|
||||
)
|
||||
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
|
||||
|
||||
-- load friendly-snippets to luasnip
|
||||
require('luasnip/loaders/from_vscode').lazy_load()
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
return function ()
|
||||
return function()
|
||||
require('catppuccin').setup({
|
||||
transparent_background = false,
|
||||
term_colors = false,
|
||||
compile = {enabled = true, path = vim.fn.stdpath 'cache' .. '/catppuccin'},
|
||||
compile = {
|
||||
enabled = true,
|
||||
path = vim.fn.stdpath 'cache' .. '/catppuccin'
|
||||
},
|
||||
styles = {
|
||||
comments = {'italic'},
|
||||
functions = {'italic'},
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
return function ()
|
||||
return function()
|
||||
vim.opt.list = true
|
||||
require('indent_blankline').setup {
|
||||
space_char_blankline = ' ',
|
||||
show_current_context = true,
|
||||
show_current_context_start = true,
|
||||
show_current_context_start = true
|
||||
}
|
||||
end
|
||||
|
|
|
@ -19,13 +19,13 @@ require('packer').startup(function()
|
|||
local use = require('packer').use
|
||||
|
||||
-- The plugin manager itself
|
||||
use {'wbthomason/packer.nvim', opt=true}
|
||||
use {'wbthomason/packer.nvim', opt = true}
|
||||
|
||||
-- Colorscheme
|
||||
use {
|
||||
'catppuccin/nvim',
|
||||
as = 'catppuccin',
|
||||
config = require('plugins.colorscheme'),
|
||||
config = require('plugins.colorscheme')
|
||||
}
|
||||
|
||||
-- Git in signcolumn
|
||||
|
@ -34,12 +34,10 @@ require('packer').startup(function()
|
|||
-- Statusline
|
||||
use {
|
||||
'hoob3rt/lualine.nvim',
|
||||
requires = { 'kyazdani42/nvim-web-devicons', opt = true },
|
||||
requires = {'kyazdani42/nvim-web-devicons', opt = true},
|
||||
config = function()
|
||||
require('lualine').setup {
|
||||
options = { theme = 'catppuccin' }
|
||||
}
|
||||
end,
|
||||
require('lualine').setup {options = {theme = 'catppuccin'}}
|
||||
end
|
||||
}
|
||||
|
||||
-- Tabline/bufferline
|
||||
|
@ -71,9 +69,9 @@ require('packer').startup(function()
|
|||
'nvim-telescope/telescope.nvim',
|
||||
config = require('plugins.telescope'),
|
||||
requires = {
|
||||
{ 'nvim-lua/plenary.nvim' }, -- Internal dep for telescope
|
||||
{ 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }, -- Use fzf for fuzzy finder
|
||||
{ 'nvim-telescope/telescope-ui-select.nvim' } -- Replace vim built in select with telescope
|
||||
{'nvim-lua/plenary.nvim'}, -- Internal dep for telescope
|
||||
{'nvim-telescope/telescope-fzf-native.nvim', run = 'make'}, -- Use fzf for fuzzy finder
|
||||
{'nvim-telescope/telescope-ui-select.nvim'} -- Replace vim built in select with telescope
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -83,7 +81,9 @@ require('packer').startup(function()
|
|||
-- Display possible keybinds
|
||||
use {
|
||||
'folke/which-key.nvim',
|
||||
config = function() require('which-key').setup {} end
|
||||
config = function()
|
||||
require('which-key').setup {spelling = {enabled = true}}
|
||||
end
|
||||
}
|
||||
|
||||
-- Read editorconfig settings
|
||||
|
@ -97,15 +97,12 @@ require('packer').startup(function()
|
|||
use {
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
config = function()
|
||||
require('mason-lspconfig').setup { automatic_installation = true }
|
||||
require('mason-lspconfig').setup {automatic_installation = true}
|
||||
end
|
||||
}
|
||||
|
||||
-- Configs for built-in LSP
|
||||
use {
|
||||
'neovim/nvim-lspconfig',
|
||||
config = require('plugins.lspconfig').setup
|
||||
}
|
||||
use {'neovim/nvim-lspconfig', config = require('plugins.lspconfig').setup}
|
||||
|
||||
-- Additional LSP features for Java
|
||||
use 'mfussenegger/nvim-jdtls'
|
||||
|
@ -117,28 +114,28 @@ require('packer').startup(function()
|
|||
use {
|
||||
'hrsh7th/nvim-cmp',
|
||||
requires = {
|
||||
{ 'hrsh7th/cmp-nvim-lsp' }, -- LSP source
|
||||
{ 'hrsh7th/cmp-path' }, -- Path source
|
||||
{ 'petertriho/cmp-git', requires = "nvim-lua/plenary.nvim" }, -- Git source
|
||||
{ 'hrsh7th/cmp-buffer' }, -- Buffer source
|
||||
{ 'saadparwaiz1/cmp_luasnip' }, -- Snippets source
|
||||
{ 'L3MON4D3/LuaSnip' }, -- Snippets plugin
|
||||
{ 'rafamadriz/friendly-snippets' }, -- Snippets collection
|
||||
{'hrsh7th/cmp-nvim-lsp'}, -- LSP source
|
||||
{'hrsh7th/cmp-path'}, -- Path source
|
||||
{'petertriho/cmp-git', requires = "nvim-lua/plenary.nvim"}, -- Git source
|
||||
{'hrsh7th/cmp-buffer'}, -- Buffer source
|
||||
{'saadparwaiz1/cmp_luasnip'}, -- Snippets source
|
||||
{'L3MON4D3/LuaSnip'}, -- Snippets plugin
|
||||
{'rafamadriz/friendly-snippets'} -- Snippets collection
|
||||
},
|
||||
config = require('plugins.cmp'),
|
||||
config = require('plugins.cmp')
|
||||
}
|
||||
|
||||
-- Automatic brackets
|
||||
use {
|
||||
'windwp/nvim-autopairs',
|
||||
config = function() require('nvim-autopairs').setup{} end
|
||||
config = function() require('nvim-autopairs').setup {} end
|
||||
}
|
||||
|
||||
-- treesitter
|
||||
use {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
run = function()
|
||||
require('nvim-treesitter.install').update({ with_sync = true })
|
||||
require('nvim-treesitter.install').update({with_sync = true})
|
||||
end,
|
||||
config = require('plugins.treesitter')
|
||||
}
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
require'lualine'.setup {
|
||||
options = {theme = 'catppuccin'},
|
||||
}
|
||||
require'lualine'.setup {options = {theme = 'catppuccin'}}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
return function ()
|
||||
return function()
|
||||
local telescope = require('telescope')
|
||||
telescope.setup {}
|
||||
telescope.load_extension('fzf')
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
return function ()
|
||||
return function()
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
ensure_installed = {
|
||||
'bash', 'c', 'css', 'dockerfile', 'html', 'http', 'java', 'json',
|
||||
'json5', 'latex', 'lua', 'make', 'markdown', 'php', 'python', 'regex',
|
||||
'rst', 'scss', 'toml', 'tsx', 'typescript', 'javascript', 'yaml'
|
||||
'json5', 'latex', 'lua', 'make', 'markdown', 'php', 'python',
|
||||
'regex', 'rst', 'scss', 'toml', 'tsx', 'typescript', 'javascript',
|
||||
'yaml'
|
||||
},
|
||||
highlight = {enable = true},
|
||||
indent = {enable = true},
|
||||
|
@ -11,6 +12,6 @@ return function ()
|
|||
context_commentstring = {enable = true}
|
||||
}
|
||||
|
||||
--vim.wo.foldmethod = 'expr'
|
||||
--im.wo.foldexpr = 'nvim_treesitter#foldexpr()'
|
||||
-- vim.wo.foldmethod = 'expr'
|
||||
-- im.wo.foldexpr = 'nvim_treesitter#foldexpr()'
|
||||
end
|
||||
|
|
|
@ -38,12 +38,10 @@ cmd 'highlight SignColumn guibg=transparent'
|
|||
-- Use suda by default
|
||||
g.suda_smart_edit = 1
|
||||
|
||||
|
||||
-- Split direction
|
||||
o.splitbelow = true
|
||||
o.splitright = true
|
||||
|
||||
|
||||
-- Case insensitive search
|
||||
o.ignorecase = true
|
||||
o.smartcase = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue