I have no idea
This commit is contained in:
1 parent
c4f2a1e4cb
commit
d069cc3ac0
15 files changed
+176
-75
No files matched your search
@@ -0,0 +1,6 @@
|
|||||||
|
local config = {
|
||||||
|
cmd = {'/path/to/jdt-language-server/bin/jdtls'},
|
||||||
|
root_dir = vim.fs.dirname(vim.fs.find({'.gradlew', '.git', 'mvnw'}, { upward = true })[1]),
|
||||||
|
}
|
||||||
|
require('jdtls').start_or_attach(config)
|
||||||
|
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
for _, name in ipairs({
|
for _, name in ipairs({
|
||||||
'reload',
|
'reload',
|
||||||
'settings',
|
'settings',
|
||||||
|
'mappings',
|
||||||
'plugins',
|
'plugins',
|
||||||
'neovide',
|
'neovide',
|
||||||
'theme'
|
'theme',
|
||||||
|
'preview'
|
||||||
}) do require('config.' .. name) end
|
}) do require('config.' .. name) end
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
local u = require 'config.utils'
|
||||||
|
|
||||||
|
-- terminal
|
||||||
|
local m = u.mapping
|
||||||
|
m.map('t', '<esc>', '<C-\\><C-n>')
|
||||||
|
m.map('t', '<C-n>', '<C-\\><C-n><C-w>h')
|
||||||
|
m.map('t', '<C-e>', '<C-\\><C-n><C-w>j')
|
||||||
|
m.map('t', '<C-i>', '<C-\\><C-n><C-w>k')
|
||||||
|
m.map('t', '<C-o>', '<C-\\><C-n><C-w>l')
|
||||||
|
m.nmap('<leader>tm', '<cmd>belowright 7sp<cr><cmd>term<cr><cmd>setlocal nonu<cr>A')
|
||||||
|
|
||||||
|
-- off search highlight when escape is pressed
|
||||||
|
m.nmap('<esc>', '<cmd>noh<cr><esc>')
|
||||||
|
|
||||||
|
-- spell checking
|
||||||
|
m.cmd('<leader>spl', 'setlocal spell spelllang=en_us')
|
||||||
|
m.cmd('<leader>spL', 'setlocal nospell')
|
||||||
|
|
||||||
|
-- colemak-dh
|
||||||
|
local l = u.layout
|
||||||
|
l.swap('n', 'h')
|
||||||
|
l.swap('e', 'j')
|
||||||
|
l.swap('i', 'k')
|
||||||
|
l.swap('o', 'l')
|
||||||
|
l.map('e','gj')
|
||||||
|
l.map('i','gk')
|
||||||
|
|
||||||
|
l.swap('<C-w>n', '<C-w>h')
|
||||||
|
l.swap('<C-w>e', '<C-w>j')
|
||||||
|
l.swap('<C-w>i', '<C-w>k')
|
||||||
|
l.swap('<C-w>o', '<C-w>l')
|
||||||
|
l.swap('<C-w>N', '<C-w>H')
|
||||||
|
l.swap('<C-w>E', '<C-w>J')
|
||||||
|
l.swap('<C-w>I', '<C-w>K')
|
||||||
|
l.swap('<C-w>O', '<C-w>L')
|
||||||
|
|
||||||
|
l.swap('N', 'H')
|
||||||
|
l.swap('O', 'L')
|
||||||
|
|
||||||
|
l.map('<C-n>', '<C-w>h')
|
||||||
|
l.map('<C-e>', '<C-w>j')
|
||||||
|
l.map('<C-i>', '<C-w>k')
|
||||||
|
l.map('<C-o>', '<C-w>l')
|
||||||
|
|
||||||
|
l.map('<C-,>', '<cmd>vert res -1<CR>')
|
||||||
|
l.map('<C-.>', '<cmd>vert res +1<CR>')
|
||||||
|
|
||||||
|
-- ascension
|
||||||
|
m.map('x','<leader>p', '\"_dp')
|
||||||
|
|
||||||
@@ -14,10 +14,10 @@ packer.startup(function(use)
|
|||||||
-- plugin categories
|
-- plugin categories
|
||||||
require 'config.plugins.telescope'(use)
|
require 'config.plugins.telescope'(use)
|
||||||
require 'config.plugins.tree'(use)
|
require 'config.plugins.tree'(use)
|
||||||
require 'config.plugins.syntax'(use)
|
|
||||||
require 'config.plugins.cmp'(use)
|
require 'config.plugins.cmp'(use)
|
||||||
require 'config.plugins.lsp'(use)
|
require 'config.plugins.lsp'(use)
|
||||||
require 'config.plugins.visual'(use)
|
require 'config.plugins.visual'(use)
|
||||||
|
require 'config.plugins.util'(use)
|
||||||
|
|
||||||
-- sync if bootstrapped
|
-- sync if bootstrapped
|
||||||
if PACKER_BOOTSTRAP then
|
if PACKER_BOOTSTRAP then
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ return function(use)
|
|||||||
{ name = 'nvim_lsp' },
|
{ name = 'nvim_lsp' },
|
||||||
{ name = 'luasnip' },
|
{ name = 'luasnip' },
|
||||||
{ name = 'path' },
|
{ name = 'path' },
|
||||||
|
{ name = 'neorg' },
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -32,10 +32,12 @@ local config = function()
|
|||||||
map('<leader>D', vim.lsp.buf.type_definition)
|
map('<leader>D', vim.lsp.buf.type_definition)
|
||||||
map('<leader>rn', vim.lsp.buf.rename)
|
map('<leader>rn', vim.lsp.buf.rename)
|
||||||
map('<leader>ca', vim.lsp.buf.code_action)
|
map('<leader>ca', vim.lsp.buf.code_action)
|
||||||
map('<leader>fm', vim.lsp.buf.formatting)
|
map('<leader>fm', function()
|
||||||
|
vim.lsp.buf.format { async = true }
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
local capabilities = require 'cmp_nvim_lsp'.update_capabilities(
|
local capabilities = require 'cmp_nvim_lsp'.default_capabilities(
|
||||||
vim.lsp.protocol.make_client_capabilities()
|
vim.lsp.protocol.make_client_capabilities()
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -48,7 +50,8 @@ local config = function()
|
|||||||
globals = { 'vim' },
|
globals = { 'vim' },
|
||||||
},
|
},
|
||||||
workspace = {
|
workspace = {
|
||||||
library = vim.api.nvim_get_runtime_file("", true)
|
library = vim.api.nvim_get_runtime_file("", true),
|
||||||
|
checkThirdParty = false
|
||||||
},
|
},
|
||||||
telemetry = {
|
telemetry = {
|
||||||
enable = false,
|
enable = false,
|
||||||
@@ -71,6 +74,18 @@ local config = function()
|
|||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
}
|
}
|
||||||
|
require 'lspconfig'.clangd.setup {
|
||||||
|
on_attach = on_attach,
|
||||||
|
capabilities = capabilities,
|
||||||
|
}
|
||||||
|
require 'lspconfig'.asm_lsp.setup {
|
||||||
|
on_attach = on_attach,
|
||||||
|
capabilities = capabilities,
|
||||||
|
}
|
||||||
|
require 'lspconfig'.pylsp.setup {
|
||||||
|
on_attach = on_attach,
|
||||||
|
capabilities = capabilities,
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
return function(use)
|
return function(use)
|
||||||
@@ -89,4 +104,8 @@ return function(use)
|
|||||||
'windwp/nvim-autopairs',
|
'windwp/nvim-autopairs',
|
||||||
config = function() require 'nvim-autopairs'.setup {} end
|
config = function() require 'nvim-autopairs'.setup {} end
|
||||||
}
|
}
|
||||||
|
use {
|
||||||
|
'scalameta/nvim-metals',
|
||||||
|
requires = { "nvim-lua/plenary.nvim" }
|
||||||
|
}
|
||||||
end
|
end
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
return function(use)
|
|
||||||
use {
|
|
||||||
'nvim-treesitter/nvim-treesitter',
|
|
||||||
run = function()
|
|
||||||
require 'nvim-treesitter.install'.update {
|
|
||||||
with_sync = true
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
config = function()
|
|
||||||
require 'nvim-treesitter.configs'.setup {
|
|
||||||
highlight = { enable = true }
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
end
|
|
||||||
@@ -33,7 +33,7 @@ return function(use)
|
|||||||
require('icon-picker').setup {}
|
require('icon-picker').setup {}
|
||||||
local u = require 'config.utils'.mapping
|
local u = require 'config.utils'.mapping
|
||||||
u.cmd('<leader>fi', 'IconPickerYank alt_font symbols nerd_font emoji')
|
u.cmd('<leader>fi', 'IconPickerYank alt_font symbols nerd_font emoji')
|
||||||
vim.keymap.set('i', '<c-i>', '<cmd>IconPickerInsert alt_font symbols nerd_font emoji<cr>')
|
vim.keymap.set('i', '<c-s>', '<cmd>IconPickerInsert alt_font symbols nerd_font emoji<cr>')
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
@@ -10,13 +10,18 @@ return function(use)
|
|||||||
config = function()
|
config = function()
|
||||||
vim.cmd [[ let g:neo_tree_remove_legacy_commands = 1 ]]
|
vim.cmd [[ let g:neo_tree_remove_legacy_commands = 1 ]]
|
||||||
require 'neo-tree'.setup {
|
require 'neo-tree'.setup {
|
||||||
|
close_if_last_window = true,
|
||||||
filesystem = {
|
filesystem = {
|
||||||
filtered_items = {
|
filtered_items = {
|
||||||
visible = true,
|
visible = true,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
window = {
|
window = {
|
||||||
width = 30,
|
width = 25,
|
||||||
|
mappings = {
|
||||||
|
["e"] = "none",
|
||||||
|
["j"] = "toggle_auto_expand_width",
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
return function(use)
|
||||||
|
use {
|
||||||
|
'nvim-neorg/neorg',
|
||||||
|
tag = '0.0.12',
|
||||||
|
config = function()
|
||||||
|
require('neorg').setup {
|
||||||
|
load = {
|
||||||
|
['core.defaults'] = {},
|
||||||
|
['core.norg.concealer'] = {},
|
||||||
|
['core.norg.completion'] = {
|
||||||
|
config = {
|
||||||
|
engine = 'nvim-cmp'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
['core.export'] = {},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
requires = 'nvim-lua/plenary.nvim'
|
||||||
|
}
|
||||||
|
use({
|
||||||
|
"iamcco/markdown-preview.nvim",
|
||||||
|
run = function() vim.fn["mkdp#util#install"]() end,
|
||||||
|
})
|
||||||
|
vim.cmd([[
|
||||||
|
function! OpenMarkdownPreview (url)
|
||||||
|
execute "silent ! firefox --new-window " . a:url
|
||||||
|
endfunction
|
||||||
|
let g:mkdp_browserfunc = 'OpenMarkdownPreview'
|
||||||
|
]])
|
||||||
|
end
|
||||||
@@ -39,4 +39,24 @@ return function(use)
|
|||||||
'lewis6991/gitsigns.nvim',
|
'lewis6991/gitsigns.nvim',
|
||||||
config = function() require 'gitsigns'.setup() end
|
config = function() require 'gitsigns'.setup() end
|
||||||
}
|
}
|
||||||
|
use {
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
run = function()
|
||||||
|
require 'nvim-treesitter.install'.update {
|
||||||
|
with_sync = true
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
config = function()
|
||||||
|
require 'nvim-treesitter.configs'.setup {
|
||||||
|
ensure_installed = {"norg"},
|
||||||
|
highlight = { enable = true }
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'elkowar/yuck.vim'
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'kmonad/kmonad-vim'
|
||||||
|
}
|
||||||
end
|
end
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
local u = require 'config.utils'
|
||||||
|
|
||||||
|
local g = vim.api.nvim_create_augroup('preview', {})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd('BufWritePost', {
|
||||||
|
group = g,
|
||||||
|
pattern = '*.tex',
|
||||||
|
callback = function(arg)
|
||||||
|
local dir = arg.file:match('.*/')
|
||||||
|
local args = ''
|
||||||
|
if dir ~= nil then
|
||||||
|
args = '-output-directory=\''..dir..'\' '
|
||||||
|
end
|
||||||
|
vim.cmd('silent exec "!pdflatex '..args..'\''..arg.file..'\'"')
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
@@ -5,12 +5,14 @@ local g = vim.api.nvim_create_augroup('reload', {})
|
|||||||
-- reload these files when written to
|
-- reload these files when written to
|
||||||
|
|
||||||
for _, mod in ipairs({
|
for _, mod in ipairs({
|
||||||
'config.reload',
|
'reload',
|
||||||
'config.settings',
|
'settings',
|
||||||
'config.utils',
|
'mappings',
|
||||||
'config.neovide',
|
'utils',
|
||||||
'config.theme',
|
'neovide',
|
||||||
}) do u.mod_post_write(g, mod, u.reload) end
|
'theme',
|
||||||
|
'preview',
|
||||||
|
}) do u.mod_post_write(g, 'config.' .. mod, u.reload) end
|
||||||
|
|
||||||
-- reload plugin files when written to
|
-- reload plugin files when written to
|
||||||
|
|
||||||
|
|||||||
+6
-46
@@ -1,12 +1,15 @@
|
|||||||
local u = require 'config.utils'
|
|
||||||
local o = vim.o
|
local o = vim.o
|
||||||
|
local g = vim.g
|
||||||
|
|
||||||
-- basic stuff
|
-- basic stuff
|
||||||
o.number = true
|
o.number = true
|
||||||
|
o.relativenumber = true
|
||||||
|
o.showmode = false
|
||||||
|
o.clipboard = 'unnamedplus'
|
||||||
|
|
||||||
|
g.mapleader = ' '
|
||||||
vim.cmd('filetype plugin on')
|
vim.cmd('filetype plugin on')
|
||||||
vim.cmd('syntax on')
|
vim.cmd('syntax on')
|
||||||
o.cmdheight = 2
|
|
||||||
vim.g.mapleader = ' '
|
|
||||||
|
|
||||||
-- line break (wrapping) settings
|
-- line break (wrapping) settings
|
||||||
o.linebreak = true
|
o.linebreak = true
|
||||||
@@ -39,46 +42,3 @@ vim.diagnostic.config({
|
|||||||
virtual_text = { prefix = '●' };
|
virtual_text = { prefix = '●' };
|
||||||
})
|
})
|
||||||
|
|
||||||
-- terminal
|
|
||||||
local m = u.mapping
|
|
||||||
m.map('t', '<esc>', '<C-\\><C-n>')
|
|
||||||
m.map('t', '<C-n>', '<C-\\><C-n><C-w>h')
|
|
||||||
m.map('t', '<C-e>', '<C-\\><C-n><C-w>j')
|
|
||||||
m.map('t', '<C-i>', '<C-\\><C-n><C-w>k')
|
|
||||||
m.map('t', '<C-o>', '<C-\\><C-n><C-w>l')
|
|
||||||
m.nmap('<leader>tm', '<cmd>belowright 7sp<cr><cmd>term<cr><cmd>setlocal nonu<cr>A')
|
|
||||||
|
|
||||||
-- off search highlight when escape is pressed
|
|
||||||
m.nmap('<esc>', '<cmd>noh<cr><esc>')
|
|
||||||
|
|
||||||
-- yank to clipboard
|
|
||||||
m.map('v', '<leader>y', '"+y')
|
|
||||||
|
|
||||||
-- spell checking
|
|
||||||
m.cmd('<leader>sp', 'setlocal spell spelllang=en_us')
|
|
||||||
m.cmd('<leader>nsp', 'setlocal nospell')
|
|
||||||
|
|
||||||
-- colemak-dh
|
|
||||||
local l = u.layout
|
|
||||||
l.swap('n', 'h')
|
|
||||||
l.swap('e', 'j')
|
|
||||||
l.swap('i', 'k')
|
|
||||||
l.swap('o', 'l')
|
|
||||||
|
|
||||||
l.swap('<C-w>n', '<C-w>h')
|
|
||||||
l.swap('<C-w>e', '<C-w>j')
|
|
||||||
l.swap('<C-w>i', '<C-w>k')
|
|
||||||
l.swap('<C-w>o', '<C-w>l')
|
|
||||||
l.swap('<C-w>N', '<C-w>H')
|
|
||||||
l.swap('<C-w>E', '<C-w>J')
|
|
||||||
l.swap('<C-w>I', '<C-w>K')
|
|
||||||
l.swap('<C-w>O', '<C-w>L')
|
|
||||||
|
|
||||||
l.swap('N', 'H')
|
|
||||||
l.swap('O', 'L')
|
|
||||||
|
|
||||||
l.swap('<C-n>', '<C-w>h')
|
|
||||||
l.swap('<C-e>', '<C-w>j')
|
|
||||||
l.swap('<C-i>', '<C-w>k')
|
|
||||||
l.swap('<C-o>', '<C-w>l')
|
|
||||||
|
|
||||||
@@ -13,4 +13,7 @@ vim.cmd [[match ExtraWhitespace /\s\+$/]]
|
|||||||
gbhl('Normal', 'none')
|
gbhl('Normal', 'none')
|
||||||
gbhl('EndOfBuffer', 'none')
|
gbhl('EndOfBuffer', 'none')
|
||||||
gbhl('SignColumn', 'none')
|
gbhl('SignColumn', 'none')
|
||||||
|
gbhl('NeoTreeNormal', 'none')
|
||||||
|
gbhl('NeoTreeNormalNC', 'none')
|
||||||
|
gbhl('NeoTreeEndOfBuffer', 'none')
|
||||||
|
|
||||||
Reference in new issue
Block a user