I have no idea

This commit is contained in:
iris committed 2023-02-06 01:52:42 -05:00
1 parent c4f2a1e4cb
commit d069cc3ac0
15 files changed
+176 -75

No files matched your search

+50
View File
@@ -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')
+1 -1
View File
@@ -14,10 +14,10 @@ packer.startup(function(use)
-- plugin categories
require 'config.plugins.telescope'(use)
require 'config.plugins.tree'(use)
require 'config.plugins.syntax'(use)
require 'config.plugins.cmp'(use)
require 'config.plugins.lsp'(use)
require 'config.plugins.visual'(use)
require 'config.plugins.util'(use)
-- sync if bootstrapped
if PACKER_BOOTSTRAP then
+1
View File
@@ -25,6 +25,7 @@ return function(use)
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'path' },
{ name = 'neorg' },
}),
})
end
+22 -3
View File
@@ -32,10 +32,12 @@ local config = function()
map('<leader>D', vim.lsp.buf.type_definition)
map('<leader>rn', vim.lsp.buf.rename)
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
local capabilities = require 'cmp_nvim_lsp'.update_capabilities(
local capabilities = require 'cmp_nvim_lsp'.default_capabilities(
vim.lsp.protocol.make_client_capabilities()
)
@@ -48,7 +50,8 @@ local config = function()
globals = { 'vim' },
},
workspace = {
library = vim.api.nvim_get_runtime_file("", true)
library = vim.api.nvim_get_runtime_file("", true),
checkThirdParty = false
},
telemetry = {
enable = false,
@@ -71,6 +74,18 @@ local config = function()
on_attach = on_attach,
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
return function(use)
@@ -89,4 +104,8 @@ return function(use)
'windwp/nvim-autopairs',
config = function() require 'nvim-autopairs'.setup {} end
}
use {
'scalameta/nvim-metals',
requires = { "nvim-lua/plenary.nvim" }
}
end
-15
View File
@@ -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
+1 -1
View File
@@ -33,7 +33,7 @@ return function(use)
require('icon-picker').setup {}
local u = require 'config.utils'.mapping
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
+7 -2
View File
@@ -10,13 +10,18 @@ return function(use)
config = function()
vim.cmd [[ let g:neo_tree_remove_legacy_commands = 1 ]]
require 'neo-tree'.setup {
close_if_last_window = true,
filesystem = {
filtered_items = {
visible = true,
}
},
},
window = {
width = 30,
width = 25,
mappings = {
["e"] = "none",
["j"] = "toggle_auto_expand_width",
}
},
}
+31
View File
@@ -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
+20
View File
@@ -39,4 +39,24 @@ return function(use)
'lewis6991/gitsigns.nvim',
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
+17
View File
@@ -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
})
+8 -6
View File
@@ -5,12 +5,14 @@ local g = vim.api.nvim_create_augroup('reload', {})
-- reload these files when written to
for _, mod in ipairs({
'config.reload',
'config.settings',
'config.utils',
'config.neovide',
'config.theme',
}) do u.mod_post_write(g, mod, u.reload) end
'reload',
'settings',
'mappings',
'utils',
'neovide',
'theme',
'preview',
}) do u.mod_post_write(g, 'config.' .. mod, u.reload) end
-- reload plugin files when written to
+6 -46
View File
@@ -1,12 +1,15 @@
local u = require 'config.utils'
local o = vim.o
local g = vim.g
-- basic stuff
o.number = true
o.relativenumber = true
o.showmode = false
o.clipboard = 'unnamedplus'
g.mapleader = ' '
vim.cmd('filetype plugin on')
vim.cmd('syntax on')
o.cmdheight = 2
vim.g.mapleader = ' '
-- line break (wrapping) settings
o.linebreak = true
@@ -39,46 +42,3 @@ vim.diagnostic.config({
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')
+3
View File
@@ -13,4 +13,7 @@ vim.cmd [[match ExtraWhitespace /\s\+$/]]
gbhl('Normal', 'none')
gbhl('EndOfBuffer', 'none')
gbhl('SignColumn', 'none')
gbhl('NeoTreeNormal', 'none')
gbhl('NeoTreeNormalNC', 'none')
gbhl('NeoTreeEndOfBuffer', 'none')