Ran luaformat on all neovim files, removed unneeded files

main
Marko Korhonen 2 years ago
parent 1df85d3a12
commit fa8e0e7331
No known key found for this signature in database
GPG Key ID: 911B85FBC6003FE5

@ -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')

@ -1,68 +1,62 @@
return function()
-- Setup git completion source
require("cmp_git").setup()
-- Setup git completion source
require("cmp_git").setup()
-- Set completeopt to have a better completion experience
vim.o.completeopt = 'menuone,noselect'
-- Set completeopt to have a better completion experience
vim.o.completeopt = 'menuone,noselect'
-- luasnip setup
local luasnip = require 'luasnip'
-- luasnip setup
local luasnip = require 'luasnip'
-- nvim-cmp setup
local cmp = require 'cmp'
cmp.setup {
snippet = {
expand = function(args)
require('luasnip').lsp_expand(args.body)
end,
},
mapping = {
['<C-p>'] = cmp.mapping.select_prev_item(),
['<C-n>'] = cmp.mapping.select_next_item(),
['<C-d>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.close(),
['<CR>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = true,
},
['<Tab>'] = function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end,
['<S-Tab>'] = function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end,
},
sources = {
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'path' },
{ name = 'git' },
{ name = 'buffer' },
},
}
-- nvim-cmp setup
local cmp = require 'cmp'
cmp.setup {
snippet = {
expand = function(args)
require('luasnip').lsp_expand(args.body)
end
},
mapping = {
['<C-p>'] = cmp.mapping.select_prev_item(),
['<C-n>'] = cmp.mapping.select_next_item(),
['<C-d>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.close(),
['<CR>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = true
},
['<Tab>'] = function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end,
['<S-Tab>'] = function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end
},
sources = {
{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()
)
-- 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())
-- load friendly-snippets to luasnip
require('luasnip/loaders/from_vscode').lazy_load()
-- load friendly-snippets to luasnip
require('luasnip/loaders/from_vscode').lazy_load()
end

@ -1,51 +1,54 @@
return function ()
require('catppuccin').setup({
transparent_background = false,
term_colors = false,
compile = {enabled = true, path = vim.fn.stdpath 'cache' .. '/catppuccin'},
styles = {
comments = {'italic'},
functions = {'italic'},
keywords = {'italic'},
strings = {},
variables = {}
},
integrations = {
treesitter = true,
native_lsp = {
enabled = true,
virtual_text = {
errors = {'italic'},
hints = {'italic'},
warnings = {'italic'},
information = {'italic'}
},
underlines = {
errors = {'underline'},
hints = {'underline'},
warnings = {'underline'},
information = {'underline'}
}
},
lsp_trouble = false,
lsp_saga = false,
gitgutter = true,
gitsigns = false,
telescope = true,
nvimtree = {enabled = false, show_root = false},
which_key = false,
indent_blankline = {enabled = true, colored_indent_levels = false},
dashboard = false,
neogit = false,
vim_sneak = false,
fern = false,
barbar = false,
bufferline = false,
markdown = false,
lightspeed = false,
ts_rainbow = false,
hop = false
}
})
vim.cmd [[colorscheme catppuccin]]
return function()
require('catppuccin').setup({
transparent_background = false,
term_colors = false,
compile = {
enabled = true,
path = vim.fn.stdpath 'cache' .. '/catppuccin'
},
styles = {
comments = {'italic'},
functions = {'italic'},
keywords = {'italic'},
strings = {},
variables = {}
},
integrations = {
treesitter = true,
native_lsp = {
enabled = true,
virtual_text = {
errors = {'italic'},
hints = {'italic'},
warnings = {'italic'},
information = {'italic'}
},
underlines = {
errors = {'underline'},
hints = {'underline'},
warnings = {'underline'},
information = {'underline'}
}
},
lsp_trouble = false,
lsp_saga = false,
gitgutter = true,
gitsigns = false,
telescope = true,
nvimtree = {enabled = false, show_root = false},
which_key = false,
indent_blankline = {enabled = true, colored_indent_levels = false},
dashboard = false,
neogit = false,
vim_sneak = false,
fern = false,
barbar = false,
bufferline = false,
markdown = false,
lightspeed = false,
ts_rainbow = false,
hop = false
}
})
vim.cmd [[colorscheme catppuccin]]
end

@ -1,8 +1,8 @@
return function ()
vim.opt.list = true
require('indent_blankline').setup {
space_char_blankline = ' ',
show_current_context = true,
show_current_context_start = true,
}
return function()
vim.opt.list = true
require('indent_blankline').setup {
space_char_blankline = ' ',
show_current_context = true,
show_current_context_start = true
}
end

@ -3,182 +3,179 @@ local fn = vim.fn
-- Install packer if it's not yet installed
local install_path = fn.stdpath('data') .. '/site/pack/packer/opt/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
print('Installing Packer')
Packer_installed = fn.system({
'git', 'clone', '--depth', '1',
'https://github.com/wbthomason/packer.nvim', install_path
})
vim.o.runtimepath = vim.fn.stdpath('data') .. '/site/pack/*/start/*,' ..
vim.o.runtimepath
print('Installed Packer')
print('Installing Packer')
Packer_installed = fn.system({
'git', 'clone', '--depth', '1',
'https://github.com/wbthomason/packer.nvim', install_path
})
vim.o.runtimepath = vim.fn.stdpath('data') .. '/site/pack/*/start/*,' ..
vim.o.runtimepath
print('Installed Packer')
end
-- Configure packer
vim.cmd [[packadd packer.nvim]]
require('packer').startup(function()
local use = require('packer').use
-- The plugin manager itself
use {'wbthomason/packer.nvim', opt=true}
-- Colorscheme
use {
'catppuccin/nvim',
as = 'catppuccin',
config = require('plugins.colorscheme'),
}
-- Git in signcolumn
use 'airblade/vim-gitgutter'
-- Statusline
use {
'hoob3rt/lualine.nvim',
requires = { 'kyazdani42/nvim-web-devicons', opt = true },
config = function()
require('lualine').setup {
options = { theme = 'catppuccin' }
}
end,
}
-- Tabline/bufferline
use {
'akinsho/nvim-bufferline.lua',
tag = '*',
requires = 'kyazdani42/nvim-web-devicons',
config = function() require('bufferline').setup {} end
}
-- Git commands
use 'tpope/vim-fugitive'
-- Indent characters
use {
'lukas-reineke/indent-blankline.nvim',
config = require('plugins.indent-blankline')
}
-- Tree explorer
use {
'kyazdani42/nvim-tree.lua',
requires = 'kyazdani42/nvim-web-devicons',
config = function() require('nvim-tree').setup {} end
}
-- Telescope
use {
'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
}
}
-- Do stuff as sudo
use 'lambdalisue/suda.vim'
-- Display possible keybinds
use {
'folke/which-key.nvim',
config = function() require('which-key').setup {} end
}
-- Read editorconfig settings
use 'editorconfig/editorconfig-vim'
-- Install LSP server executables
use {
'williamboman/mason.nvim',
config = function() require('mason').setup {} end
}
use {
'williamboman/mason-lspconfig.nvim',
config = function()
require('mason-lspconfig').setup { automatic_installation = true }
end
}
-- Configs for built-in LSP
use {
'neovim/nvim-lspconfig',
config = require('plugins.lspconfig').setup
}
-- Additional LSP features for Java
use 'mfussenegger/nvim-jdtls'
-- Display function signature
use 'ray-x/lsp_signature.nvim'
-- Completion
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
},
config = require('plugins.cmp'),
}
-- Automatic brackets
use {
'windwp/nvim-autopairs',
config = function() require('nvim-autopairs').setup{} end
}
-- treesitter
use {
'nvim-treesitter/nvim-treesitter',
run = function()
require('nvim-treesitter.install').update({ with_sync = true })
end,
config = require('plugins.treesitter')
}
-- treesitter plugin for commentstring
use 'JoosepAlviste/nvim-ts-context-commentstring'
-- Additional plugins for formats not supported
-- by treesitter
use 'jamespeapen/swayconfig.vim'
-- mappings for commenting in code
use 'tpope/vim-commentary'
-- we all know this one
use 'tpope/vim-surround'
-- Formatter plugin
use 'sbdchd/neoformat'
-- Make editing passwords safer
use {
'https://git.zx2c4.com/password-store',
rtp = 'contrib/vim/redact_pass.vim'
}
-- Neovim inside Firefox
use {
'glacambre/firenvim',
run = function() vim.fn['firenvim#install'](0) end
}
-- Vim <3 Asciidoctor
use 'habamax/vim-asciidoctor'
local use = require('packer').use
-- The plugin manager itself
use {'wbthomason/packer.nvim', opt = true}
-- Colorscheme
use {
'catppuccin/nvim',
as = 'catppuccin',
config = require('plugins.colorscheme')
}
-- Git in signcolumn
use 'airblade/vim-gitgutter'
-- Statusline
use {
'hoob3rt/lualine.nvim',
requires = {'kyazdani42/nvim-web-devicons', opt = true},
config = function()
require('lualine').setup {options = {theme = 'catppuccin'}}
end
}
-- Tabline/bufferline
use {
'akinsho/nvim-bufferline.lua',
tag = '*',
requires = 'kyazdani42/nvim-web-devicons',
config = function() require('bufferline').setup {} end
}
-- Git commands
use 'tpope/vim-fugitive'
-- Indent characters
use {
'lukas-reineke/indent-blankline.nvim',
config = require('plugins.indent-blankline')
}
-- Tree explorer
use {
'kyazdani42/nvim-tree.lua',
requires = 'kyazdani42/nvim-web-devicons',
config = function() require('nvim-tree').setup {} end
}
-- Telescope
use {
'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
}
}
-- Do stuff as sudo
use 'lambdalisue/suda.vim'
-- Display possible keybinds
use {
'folke/which-key.nvim',
config = function()
require('which-key').setup {spelling = {enabled = true}}
end
}
-- Read editorconfig settings
use 'editorconfig/editorconfig-vim'
-- Install LSP server executables
use {
'williamboman/mason.nvim',
config = function() require('mason').setup {} end
}
use {
'williamboman/mason-lspconfig.nvim',
config = function()
require('mason-lspconfig').setup {automatic_installation = true}
end
}
-- Configs for built-in LSP
use {'neovim/nvim-lspconfig', config = require('plugins.lspconfig').setup}
-- Additional LSP features for Java
use 'mfussenegger/nvim-jdtls'
-- Display function signature
use 'ray-x/lsp_signature.nvim'
-- Completion
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
},
config = require('plugins.cmp')
}
-- Automatic brackets
use {
'windwp/nvim-autopairs',
config = function() require('nvim-autopairs').setup {} end
}
-- treesitter
use {
'nvim-treesitter/nvim-treesitter',
run = function()
require('nvim-treesitter.install').update({with_sync = true})
end,
config = require('plugins.treesitter')
}
-- treesitter plugin for commentstring
use 'JoosepAlviste/nvim-ts-context-commentstring'
-- Additional plugins for formats not supported
-- by treesitter
use 'jamespeapen/swayconfig.vim'
-- mappings for commenting in code
use 'tpope/vim-commentary'
-- we all know this one
use 'tpope/vim-surround'
-- Formatter plugin
use 'sbdchd/neoformat'
-- Make editing passwords safer
use {
'https://git.zx2c4.com/password-store',
rtp = 'contrib/vim/redact_pass.vim'
}
-- Neovim inside Firefox
use {
'glacambre/firenvim',
run = function() vim.fn['firenvim#install'](0) end
}
-- Vim <3 Asciidoctor
use 'habamax/vim-asciidoctor'
end)
-- Sync plugins if Packer was just
-- installed
if Packer_installed then
print('Syncing plugins')
require('packer').sync()
print('Syncing plugins')
require('packer').sync()
end

@ -1,3 +1 @@
require'lualine'.setup {
options = {theme = 'catppuccin'},
}
require'lualine'.setup {options = {theme = 'catppuccin'}}

@ -1,6 +1,6 @@
return function ()
local telescope = require('telescope')
telescope.setup {}
telescope.load_extension('fzf')
telescope.load_extension('ui-select')
return function()
local telescope = require('telescope')
telescope.setup {}
telescope.load_extension('fzf')
telescope.load_extension('ui-select')
end

@ -1,16 +1,17 @@
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'
},
highlight = {enable = true},
indent = {enable = true},
incremental_selection = {enable = true},
context_commentstring = {enable = true}
}
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'
},
highlight = {enable = true},
indent = {enable = true},
incremental_selection = {enable = true},
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…
Cancel
Save