28 Commits

Author SHA1 Message Date
1a00736e35 nvim: Add lsp files; Update plugins 2025-10-28 15:59:16 +01:00
b9f7601210 nvim: Change telescope keymaps 2025-10-28 14:07:54 +01:00
42c0ee17ab nvim: Add TodoTroube keymap (xt) 2025-10-28 14:07:01 +01:00
a29e798b3a nvim: Code style 2025-10-28 14:06:37 +01:00
448bb7a748 nvim: Add grr keymap 2025-10-28 14:06:22 +01:00
fccfac8e73 Change sway keyboard layout 2025-10-28 14:05:59 +01:00
2fb9f3f9e6 nvim: Fix LSP formatting messing up alternate file 2025-07-25 15:00:06 -04:00
6f1910c323 Add pytorch to win+p python window 2025-07-25 14:57:55 -04:00
2fd4ea36cc Add csvview plugin 2025-07-25 14:57:47 -04:00
b433bf4f67 Add mdformat-myst formatter as lsp 2025-07-25 10:17:09 -04:00
2dbc45f106 nvim: Add gd keyboard shortcut 2025-07-25 10:16:44 -04:00
c8a8f61a9f nvim: Add texlab LSP; Clean up ruff config 2025-06-26 10:30:30 -04:00
d95aefb166 nvim: Fix LSP tab/enter; Fix multi-LSP formatting; Add ruff and neocmakelsp 2025-06-26 00:20:42 -04:00
17b700c910 Remove exisint lsp config; Start adding LSPs with new config 2025-06-18 10:10:58 -04:00
b963d7746e nvim: Update plugins 2025-06-17 22:15:51 -04:00
067c6aa2ee nvim: Change formatter config 2025-06-17 22:15:04 -04:00
de6447fe19 nvim: Comment out matlab lsp config 2025-06-17 22:14:10 -04:00
516b187060 nvim: Disable copilot by default 2025-06-17 22:13:04 -04:00
7cfdf63c01 nvim: Reenable pastify with different keymap 2025-06-17 22:12:23 -04:00
192b290e4a nvim: Change markdown_preview build process 2025-06-17 22:11:51 -04:00
3c76341341 nvim: Remove nvim-tree; Add oil.nvim 2025-06-17 22:10:58 -04:00
efeca2ff10 nvim: Fix overseer task name 2025-06-17 22:10:23 -04:00
c7819c793f nvim: Enable exrc 2025-06-17 22:08:48 -04:00
d9671f74c7 Add latex snippets 2025-06-17 22:08:34 -04:00
b56400c12c sway: Enable dwt; Change workspace names; Change workspace display naming 2025-06-17 22:07:41 -04:00
7472a05642 Add nvim QQ remap 2025-06-17 22:07:10 -04:00
ed605f580e Remove Kinemic screen config, add Bell labs 2025-06-17 22:05:24 -04:00
2e0cc89584 Change source paths in zshrc 2025-06-17 22:04:53 -04:00
33 changed files with 464 additions and 333 deletions

View File

@@ -3,7 +3,7 @@ profile Home {
output "DP-11" mode 1920x1200@59.95Hz position 0,0 transform normal scale 1.0 output "DP-11" mode 1920x1200@59.95Hz position 0,0 transform normal scale 1.0
} }
profile Kinemic { profile Bell {
output "eDP-1" mode 2256x1504@59.999Hz position 449,1440 transform normal scale 1.399999976158142 output "eDP-1" mode 2256x1504@59.999Hz position 2137,425 transform normal scale 1.399999976158142
output "DP-3" mode 2560x1440@59.951Hz position 0,0 transform normal scale 1.0 output "DP-3" mode 1920x1080@59.951Hz position 0,0 transform normal scale 0.9
} }

View File

@@ -1,16 +1,19 @@
require("set") require("set")
require("remap") require("remap")
require("lsp")
-- Set up lazy
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ vim.fn.system({
"git", "git",
"clone", "clone",
"--filter=blob:none", "--filter=blob:none",
"https://github.com/folke/lazy.nvim.git", "https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release "--branch=stable", -- latest stable release
lazypath, lazypath,
}) })
end end
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)

View File

@@ -1,57 +1,48 @@
{ {
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" },
"alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" }, "alpha-nvim": { "branch": "main", "commit": "2b3cbcdd980cae1e022409289245053f62fb50f6" },
"auto-session": { "branch": "main", "commit": "9c3f977aafb56bd73ba0d082c4dcbdba5666faf3" }, "auto-session": { "branch": "main", "commit": "f0eb3d69848389869572b82b336d7a6887e88e43" },
"cellular-automaton.nvim": { "branch": "main", "commit": "1606e9d5d04ff254023c3f3c62842d065708d6d3" }, "cellular-automaton.nvim": { "branch": "main", "commit": "1606e9d5d04ff254023c3f3c62842d065708d6d3" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "copilot.lua": { "branch": "master", "commit": "93adf9844dcbe09a37e7a72eaa286d33d38bf628" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, "csvview.nvim": { "branch": "main", "commit": "bbab4c2f808fd8e11ec8dfdd128251aadba566a1" },
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"copilot.lua": { "branch": "master", "commit": "30321e33b03cb924fdcd6a806a0dc6fa0b0eafb9" },
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" }, "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"gruvbox.nvim": { "branch": "main", "commit": "15958f5ee43e144856cd2084ce6c571bfdb44504" }, "gruvbox.nvim": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" },
"harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" }, "harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" },
"image.nvim": { "branch": "master", "commit": "6ffafab2e98b5bda46bf227055aa84b90add8cdc" }, "image.nvim": { "branch": "master", "commit": "446a8a5cc7a3eae3185ee0c697732c32a5547a0b" },
"jupytext.nvim": { "branch": "main", "commit": "c8baf3ad344c59b3abd461ecc17fc16ec44d0f7b" }, "jupytext.nvim": { "branch": "main", "commit": "c8baf3ad344c59b3abd461ecc17fc16ec44d0f7b" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "lazy.nvim": { "branch": "main", "commit": "db067881fff0fd4be8c00e5bde7492e0e1c77a2f" },
"lsp-colors.nvim": { "branch": "main", "commit": "2bbe7541747fd339bdd8923fc45631a09bb4f1e5" }, "lsp-colors.nvim": { "branch": "main", "commit": "2bbe7541747fd339bdd8923fc45631a09bb4f1e5" },
"lsp-zero.nvim": { "branch": "v3.x", "commit": "ab2a3413646fedd77aa0eab4214a6473e62f6a64" }, "lualine.nvim": { "branch": "master", "commit": "3946f0122255bc377d14a59b27b609fb3ab25768" },
"lualine.nvim": { "branch": "master", "commit": "f4f791f67e70d378a754d02da068231d2352e5bc" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
"markdown-toc.nvim": { "branch": "main", "commit": "049451fe7825f55e9b17ae1297a538278ffc557a" }, "markdown-toc.nvim": { "branch": "main", "commit": "869af35bce0c27e2006f410fa3f706808db4843d" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, "mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" },
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
"molten-nvim": { "branch": "main", "commit": "a286aa914d9a154bc359131aab788b5a077a5a99" }, "molten-nvim": { "branch": "main", "commit": "a286aa914d9a154bc359131aab788b5a077a5a99" },
"neoformat": { "branch": "master", "commit": "6a0dc851893c8bf9c932a69c4277e82b88120009" }, "noice.nvim": { "branch": "main", "commit": "d14d02cb709e3bb2da88363c32f8b4250bced52d" },
"noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" }, "nvim-dap": { "branch": "master", "commit": "6782b097af2417a4c3e33849b0a26ae2188bd7ea" },
"nvim-cmp": { "branch": "main", "commit": "c27370703e798666486e3064b64d59eaf4bdc6d5" }, "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
"nvim-dap": { "branch": "master", "commit": "8228cb00ab0850e483f8d58cc39cc580c05738d6" },
"nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" },
"nvim-lspconfig": { "branch": "master", "commit": "fd26f8626c03b424f7140d454031d1dcb8d23513" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-tree.lua": { "branch": "master", "commit": "c09ff35de503a41fa62465c6b4ae72d96e7a7ce4" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-treesitter": { "branch": "master", "commit": "feab1f19f889fd6da9f80ced4717ae60d56f6519" }, "nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" },
"nvim-web-devicons": { "branch": "master", "commit": "ab4cfee554e501f497bce0856788d43cf2eb93d7" }, "oil.nvim": { "branch": "master", "commit": "7e1cd7703ff2924d7038476dcbc04b950203b902" },
"otter.nvim": { "branch": "main", "commit": "e37053d2c6a17463e705483122eee04d41e3d4af" }, "otter.nvim": { "branch": "main", "commit": "fc0aa35b1985077d11a20ddf4006bf40f2cd7397" },
"overseer.nvim": { "branch": "master", "commit": "d95931e9e8cc4429819c8bbae395da00a6800d1e" }, "overseer.nvim": { "branch": "master", "commit": "c77c78b35d0b4d244e1cd77c25ec93a16fbbfc94" },
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, "pastify.nvim": { "branch": "main", "commit": "4a1d1e03c3ae725ee4af796deca8c7c169ef626e" },
"quarto-nvim": { "branch": "main", "commit": "93b1f5a1abc1b1da653f353947f62b294574759c" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"quarto-nvim": { "branch": "main", "commit": "0e9491509b38efbd83d3f41dbfacc7fc4bd40191" },
"session-lens": { "branch": "main", "commit": "eae46b472b3150f5ec0f977556e8085683d49eb0" }, "session-lens": { "branch": "main", "commit": "eae46b472b3150f5ec0f977556e8085683d49eb0" },
"sqlite.nvim": { "branch": "master", "commit": "a8466c830a89794c2eafa41b41dd11fdf4a0d7ca" }, "sqlite.nvim": { "branch": "master", "commit": "a8466c830a89794c2eafa41b41dd11fdf4a0d7ca" },
"telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
"time-tracker.nvim": { "branch": "master", "commit": "c84998bbadb1afca8e09943b1c14bafe1711bb9a" }, "time-tracker.nvim": { "branch": "master", "commit": "4127c4b5fecaf5f5cb3aa840707e58bb88eb9bf0" },
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, "todo-comments.nvim": { "branch": "main", "commit": "19d461ddd543e938eb22505fb03fa878800270b6" },
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
"trouble.nvim": { "branch": "main", "commit": "3609bb9a82bbab1ef95cf2c27ce7e52267a7d40d" }, "trouble.nvim": { "branch": "main", "commit": "3609bb9a82bbab1ef95cf2c27ce7e52267a7d40d" },
"undotree": { "branch": "master", "commit": "76c4e32d8f1aa493bb68d4a3fcd3c700395c303c" }, "undotree": { "branch": "master", "commit": "0f1c9816975b5d7f87d5003a19c53c6fd2ff6f7f" },
"vim-doge": { "branch": "master", "commit": "750d17dcd5a38a6afb51ddd07ee7d3e96bab7e9e" }, "vim-doge": { "branch": "master", "commit": "03a84072ef21b205237c77986c78914395d646c3" },
"vim-flog": { "branch": "master", "commit": "77c86cb5db8960d224f2a866120893e61d62f5e8" }, "vim-flog": { "branch": "master", "commit": "665b16ac8915f746bc43c9572b4581a5e9047216" },
"vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" }, "vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
"vimtex": { "branch": "master", "commit": "cf6b84775624582d7422715ee46b0a63b53cee38" }, "vimtex": { "branch": "master", "commit": "be9deac3a23eeb145ccf11dd09080795838496ce" },
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } "which-key.nvim": { "branch": "main", "commit": "b4177e3eaf15fe5eb8357ebac2286d488be1ed00" }
} }

View File

@@ -0,0 +1,13 @@
return {
cmd = {
'clangd'
},
root_markers = {
'.clangd',
'compile_commands.json'
},
filetypes = {
'c',
'cpp'
}
}

View File

@@ -0,0 +1,9 @@
return {
cmd = { 'docker-langserver', '--stdio' },
filetypes = {
'dockerfile'
},
root_markers = {
'Dockerfile',
},
}

View File

@@ -0,0 +1,20 @@
return {
cmd = {
'lua-language-server'
},
filetypes = {
'lua'
},
root_markers = {
'.luarc.json',
'.luarc.jsonc',
'.git'
},
settings = {
Lua = {
runtime = {
version = 'LuaJIT'
}
}
}
}

View File

View File

@@ -0,0 +1,5 @@
return {
cmd = { "neocmakelsp", "--stdio" },
filetypes = { "cmake" },
root_markers = { ".git", "README.md" }
}

View File

@@ -0,0 +1,20 @@
return {
cmd = {
'pyright-langserver', '--stdio'
},
settings = {
python = {
analysis = {
typeCheckingMode = "basic", -- or "strict", "off"
autoSearchPaths = true,
useLibraryCodeForTypes = true,
},
},
},
root_markers = {
'pyproject.toml', 'setup.py', 'setup.cfg', 'requirements.txt', '.git'
},
filetypes = {
'python'
},
}

View File

@@ -0,0 +1,11 @@
return {
cmd = {
'ruff', 'server'
},
filetypes = {
'python'
},
root_markers = {
'setup.py', 'setup.cfg', 'requirements.txt', '.git', 'ruff.toml'
}
}

View File

@@ -0,0 +1,19 @@
return {
cmd = { 'rust-analyzer' },
filetypes = { 'rust' },
root_markers = { "Cargo.toml", ".git" },
-- single_file_support = true,
-- settings = {
-- ['rust-analyzer'] = {
-- diagnostics = {
-- enable = false,
-- }
-- }
-- },
before_init = function(init_params, config)
-- See https://github.com/rust-lang/rust-analyzer/blob/eb5da56d839ae0a9e9f50774fa3eb78eb0964550/docs/dev/lsp-extensions.md?plain=1#L26
if config.settings and config.settings['rust-analyzer'] then
init_params.initializationOptions = config.settings['rust-analyzer']
end
end,
}

View File

@@ -0,0 +1,27 @@
return {
cmd = { 'texlab' },
filetypes = { 'tex' },
root_markers = { '.git', '.latexmkrc' },
settings = {
texlab = {
rootDirectory = nil,
build = {
executable = 'latexmk',
args = { '-pdf', '-interaction=nonstopmode', '-synctex=1', '%f' },
onSave = false,
forwardSearchAfter = false,
},
forwardSearch = {
executable = nil,
args = {},
},
chktex = {
onOpenAndSave = false,
onEdit = false,
},
diagnosticsDelay = 300,
latexFormatter = 'tex-fmt',
bibtexFormatter = 'tex-fmt',
},
},
}

View File

@@ -0,0 +1,90 @@
-- Set up LSP
local lsp_configs = {}
for _, f in pairs(vim.api.nvim_get_runtime_file('lsp/*.lua', true)) do
local server_name = vim.fn.fnamemodify(f, ':t:r')
table.insert(lsp_configs, server_name)
end
vim.lsp.enable(lsp_configs)
vim.o.completeopt = "menu,menuone,noinsert"
vim.api.nvim_set_keymap("i", "<C-Space>", "<C-x><C-o>", { noremap = true })
-- TODO: Put this somewhere sensible
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('my.lsp', {}),
callback = function(args)
local client = assert(vim.lsp.get_client_by_id(args.data.client_id))
-- Make Tab accept the selected completion
vim.keymap.set('i', '<Tab>', function()
if vim.fn.pumvisible() == 1 then
return '<C-y>'
else
return '<Tab>'
end
end, { expr = true })
-- Make Enter just insert a newline (don't accept completion)
vim.keymap.set('i', '<CR>', function()
if vim.fn.pumvisible() == 1 then
return '<C-e><CR>'
else
return '<CR>'
end
end, { expr = true })
-- Enable auto-completion. Note: Use CTRL-Y to select an item. |complete_CTRL-Y|
if client:supports_method('textDocument/completion') then
-- Trigger autocompletion on EVERY keypress. May be slow!
local chars = {}; for i = 32, 126 do table.insert(chars, string.char(i)) end
client.server_capabilities.completionProvider.triggerCharacters = chars
vim.lsp.completion.enable(true, client.id, args.buf, { autotrigger = true })
end
vim.keymap.set('n', '<M-L>',
function() vim.lsp.buf.format() end,
{
desc = "Format",
noremap = true,
silent = true
})
vim.keymap.set('i', '<M-L>',
function() vim.lsp.buf.format() end,
{
desc = "Format",
noremap = true,
silent = true
})
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, {
desc = "Go to definition"
})
vim.keymap.set("n", "grr", ":Trouble lsp_references<CR>", {
desc = "Show references"
})
-- if client:supports_method('textDocument/implementation') then
-- -- Create a keymap for vim.lsp.buf.implementation ...
-- end
-- -- Auto-format ("lint") on save.
-- -- Usually not needed if server supports "textDocument/willSaveWaitUntil".
-- if not client:supports_method('textDocument/willSaveWaitUntil')
-- and client:supports_method('textDocument/formatting') then
-- vim.api.nvim_create_autocmd('BufWritePre', {
-- group = vim.api.nvim_create_augroup('my.lsp', { clear = false }),
-- buffer = args.buf,
-- callback = function()
-- vim.lsp.buf.format({ bufnr = args.buf, id = client.id, timeout_ms = 1000 })
-- end,
-- })
-- end
end,
})

View File

@@ -1,5 +1,5 @@
return { return {
name = "Cargog Test", name = "Cargo Test",
builder = function() builder = function()
return { return {
cmd = { cmd = {

View File

@@ -0,0 +1,26 @@
return {
"hat0uma/csvview.nvim",
---@module "csvview"
---@type CsvView.Options
opts = {
parser = { comments = { "#", "//" } },
keymaps = {
-- Text objects for selecting fields
textobject_field_inner = { "if", mode = { "o", "x" } },
textobject_field_outer = { "af", mode = { "o", "x" } },
-- Excel-like navigation:
-- Use <Tab> and <S-Tab> to move horizontally between fields.
-- Use <Enter> and <S-Enter> to move vertically between rows and place the cursor at the end of the field.
-- Note: In terminals, you may need to enable CSI-u mode to use <S-Tab> and <S-Enter>.
jump_next_field_end = { "<Tab>", mode = { "n", "v" } },
jump_prev_field_end = { "<S-Tab>", mode = { "n", "v" } },
jump_next_row = { "<Enter>", mode = { "n", "v" } },
jump_prev_row = { "<S-Enter>", mode = { "n", "v" } },
},
},
cmd = { "CsvViewEnable", "CsvViewDisable", "CsvViewToggle" },
init = function()
vim.keymap.set("n", "<leader>ce", ":CsvViewEnable display_mode=border header_lnum=1<CR>")
vim.keymap.set("n", "<leader>cd", ":CsvViewDisable<CR>")
end
}

View File

@@ -1,193 +0,0 @@
return {
{
{
'VonHeikemen/lsp-zero.nvim',
branch = 'v3.x',
lazy = true,
config = false,
init = function()
-- Disable automatic setup, we are doing it manually
vim.g.lsp_zero_extend_cmp = 0
vim.g.lsp_zero_extend_lspconfig = 0
end
},
{
'williamboman/mason.nvim',
lazy = false,
opts = {
registries = {
"github:antsouchlos/mason-registry",
"github:mason-org/mason-registry"
}
}
},
-- Autocompletion
{
'hrsh7th/nvim-cmp',
event = 'InsertEnter',
dependencies = {
'L3MON4D3/LuaSnip',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-path',
'hrsh7th/cmp-cmdline',
'hrsh7th/cmp-nvim-lsp-signature-help',
'saadparwaiz1/cmp_luasnip'
},
config = function()
local lsp_zero = require('lsp-zero')
lsp_zero.extend_cmp()
local cmp = require('cmp')
cmp.setup({
sources = {
-- LuaFormatter off
{ name = 'path' },
{ name = 'nvim_lsp' },
{ name = 'nvim_lua' },
{ name = 'luasnip', keyword_length = 2 },
{ name = 'buffer', keyword_length = 3 },
{ name = 'nvim_lsp_signature_help' }
-- LuaFormatter on
},
formatting = lsp_zero.cmp_format(),
mapping = cmp.mapping.preset.insert({
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
['<Tab>'] = cmp.mapping.confirm({
select = true
}),
['<C-Space>'] = cmp.mapping.complete()
}),
snippet = {
expand = function(args) require('luasnip').lsp_expand(args.body) end
}
})
cmp.setup.filetype('gitcommit', {
-- LuaFormatter off
sources = cmp.config.sources(
{ { name = 'git' } },
{ { name = 'buffer' } }
)
-- LuaFormatter on
})
cmp.setup.cmdline({
'/',
'?'
}, {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{
name = 'buffer'
}
}
})
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{
name = 'path'
}
}, {
{
name = 'cmdline'
}
})
})
end
},
-- LSP
{
'neovim/nvim-lspconfig',
cmd = {
'LspInfo',
'LspInstall',
'LspStart'
},
event = {
'BufReadPre',
'BufNewFile'
},
dependencies = {
'hrsh7th/cmp-nvim-lsp',
'williamboman/mason-lspconfig.nvim',
"folke/trouble.nvim"
},
config = function()
local lsp_zero = require('lsp-zero')
lsp_zero.extend_lspconfig()
lsp_zero.on_attach(function(client, bufnr)
vim.keymap.set("n", "<leader>ld", function() vim.lsp.buf.definition() end, {
desc = "Go to definition"
})
vim.keymap.set("n", "<leader>lh", function() vim.lsp.buf.hover() end, {
desc = "Hover"
})
vim.keymap.set("n", "<leader>lr", ":Trouble lsp_references<CR>", {
desc = "Show references"
})
vim.keymap.set("n", "<leader>ln", function() vim.lsp.buf.rename() end, {
desc = "Rename"
})
vim.keymap.set("n", "<leader>ls", function() vim.lsp.buf.signature_help() end, {
desc = "Signature help"
})
vim.keymap.set("n", "<leader>la", function() vim.lsp.buf.code_action() end, {
desc = "Code actions"
})
end)
require('mason-lspconfig').setup({
ensure_installed = {
'clangd',
'pyright',
'cmake',
'texlab'
},
handlers = {
lsp_zero.default_setup,
lua_ls = function()
local lua_opts = lsp_zero.nvim_lua_ls()
require('lspconfig').lua_ls.setup(lua_opts)
end
}
})
require('lspconfig')['clangd'].setup {
cmd = {
"clangd",
"--background-index",
"--clang-tidy",
"--completion-style=bundled",
"--cross-file-rename",
"--header-insertion=iwyu",
-- Required for embedded system compilers
"--query-driver=/**/*g++",
"--offset-encoding=utf-16"
-- "-j=8",
-- "--malloc-trim",
-- "--pch-storage=memory"
}
}
require('lspconfig').matlab_ls.setup({
settings = {
filetypes = {
"matlab"
},
matlab = {
installPath = "/opt/matlab/R2023a/"
}
},
single_file_support = true
})
end
}
}
}

View File

@@ -1,12 +1,13 @@
return { return {
"zbirenbaum/copilot.lua", "zbirenbaum/copilot.lua",
cmd = "Copilot", cmd = "Copilot",
event = "InsertEnter", -- event = "InsertEnter",
opts = { opts = {
suggestion = { suggestion = {
enabled = true,
auto_trigger = true, auto_trigger = true,
keymap = { keymap = {
accept = "<C-l>", accept = "<C-l>"
-- accept_word = false, -- accept_word = false,
-- accept_line = false, -- accept_line = false,
-- next = "<M-]>", -- next = "<M-]>",

View File

@@ -1,15 +1,27 @@
return { return {
{ -- Install markdown preview, use npx if available.
"iamcco/markdown-preview.nvim", "iamcco/markdown-preview.nvim",
cmd = { cmd = {
"MarkdownPreviewToggle", "MarkdownPreviewToggle",
"MarkdownPreview", "MarkdownPreview",
"MarkdownPreviewStop" "MarkdownPreviewStop"
}, },
ft = { ft = {
"markdown" "markdown"
}, },
build = function() vim.fn["mkdp#util#install"]() end build = function(plugin)
} if vim.fn.executable "npx" then
vim.cmd("!cd " .. plugin.dir .. " && cd app && npx --yes yarn install")
else
vim.cmd [[Lazy load markdown-preview.nvim]]
vim.fn["mkdp#util#install"]()
end
end,
init = function()
if vim.fn.executable "npx" then
vim.g.mkdp_filetypes = {
"markdown"
}
end
end
} }

View File

@@ -0,0 +1,10 @@
return {
'williamboman/mason.nvim',
lazy = false,
opts = {
registries = {
"github:antsouchlos/mason-registry",
"github:mason-org/mason-registry"
}
}
}

View File

@@ -1,37 +0,0 @@
return {
{
'sbdchd/neoformat',
event = {
"BufReadPost",
"BufNewFile"
},
init = function()
vim.cmd([[
let g:neoformat_enabled_python = ['autopep8']
let g:neoformat_enabled_cpp = ['clangformat']
let g:neoformat_enabled_c = ['clangformat']
let g:neoformat_enable_lua = ['luaformatter']
let g:neoformat_enabled_cmake = ['cmakeformat']
let g:neoformat_markdown_mdformat = {
\ 'exe': 'mdformat',
\ 'args': ['--wrap=79', '--number'],
\ 'replace': 1,
\ }
let g:neoformat_enabled_markdown = ['mdformat']
let g:neoformat_enabled_latex = ['latexindent']
let g:latexindent_opt="-m -l -g=/dev/null"
]])
vim.api.nvim_set_keymap('n', '<M-L>', '<cmd>Neoformat<cr>', {
noremap = true,
silent = true
})
vim.api.nvim_set_keymap('i', '<M-L>', '<cmd>Neoformat<cr>', {
noremap = true,
silent = true
})
end
}
}

View File

@@ -0,0 +1,13 @@
return {
'stevearc/oil.nvim',
opts = {},
dependencies = {
"nvim-tree/nvim-web-devicons"
},
init = function()
vim.keymap.set("n", "-", "<CMD>Oil<CR>", {
desc = "Open parent directory"
})
end,
lazy = false
}

View File

@@ -11,19 +11,19 @@ return {
{ {
noremap = true, noremap = true,
mode = "x", mode = "x",
'<leader>p', '<leader>v',
"<cmd>PastifyAfter<CR>" "<cmd>PastifyAfter<CR>"
}, },
{ {
noremap = true, noremap = true,
mode = "n", mode = "n",
'<leader>p', '<leader>v',
"<cmd>PastifyAfter<CR>" "<cmd>PastifyAfter<CR>"
}, },
{ {
noremap = true, noremap = true,
mode = "n", mode = "n",
'<leader>P', '<leader>V',
"<cmd>Pastify<CR>" "<cmd>Pastify<CR>"
} }
}, },

View File

@@ -6,19 +6,19 @@
-- local function execute_in_repo_root(func) -- local function execute_in_repo_root(func)
-- local function is_git_repo() -- local function is_git_repo()
-- vim.fn.system("git rev-parse --is-inside-work-tree") -- vim.fn.system("git rev-parse --is-inside-work-tree")
-- --
-- return vim.v.shell_error == 0 -- return vim.v.shell_error == 0
-- end -- end
-- --
-- local function get_git_root() -- local function get_git_root()
-- local dot_git_path = vim.fn.finddir(".git", ".;") -- local dot_git_path = vim.fn.finddir(".git", ".;")
-- return vim.fn.fnamemodify(dot_git_path, ":h") -- return vim.fn.fnamemodify(dot_git_path, ":h")
-- end -- end
-- --
-- local opts = {} -- local opts = {}
-- --
-- if is_git_repo() then opts = {cwd = get_git_root()} end -- if is_git_repo() then opts = {cwd = get_git_root()} end
-- --
-- func(opts) -- func(opts)
-- end -- end
----------------------- -----------------------
@@ -30,21 +30,38 @@ return {
version = '0.1.5', version = '0.1.5',
dependencies = { dependencies = {
{ {
'nvim-lua/plenary.nvim' 'nvim-lua/plenary.nvim',
'folke/trouble.nvim',
} }
}, },
cmd = "Telescope", cmd = "Telescope",
init = function() init = function()
-- LuaFormatter off -- Set up keymaps
vim.keymap.set('n', '<leader>ff', function() require("telescope.builtin").find_files() end,{desc = "Files"})
vim.keymap.set('n', '<leader>fg', function() require("telescope.builtin").live_grep() end,{desc = "grep"})
vim.keymap.set('n', '<leader>fa', function()
require("telescope.builtin").find_files({hidden = true})
end, {desc = "All files"})
vim.keymap.set('n', '<leader>fb', function() require("telescope.builtin").buffers() end, {desc = "Buffers"}) vim.keymap.set('n', '<leader>ff', function() require("telescope.builtin").find_files() end,
vim.keymap.set('n', '<leader>fh', function() require("telescope.builtin").help_tags() end, {desc = "Help tags"}) { desc = "Files" })
-- LuaFormatter on vim.keymap.set('n', '<leader>fg', function() require("telescope.builtin").live_grep() end, { desc = "grep" })
vim.keymap.set('n', '<leader>fa', function()
require("telescope.builtin").find_files({ hidden = true })
end, { desc = "All files" })
vim.keymap.set('n', '<leader>fb', function() require("telescope.builtin").buffers() end, { desc = "Buffers" })
vim.keymap.set('n', '<leader>fh', function() require("telescope.builtin").help_tags() end,
{ desc = "Help tags" })
-- Set up trouble
local open_with_trouble = require("trouble.sources.telescope").open
local telescope = require("telescope")
telescope.setup({
defaults = {
mappings = {
i = { ["<c-t>"] = open_with_trouble },
n = { ["<c-t>"] = open_with_trouble },
},
},
})
end end
} }
} }

View File

@@ -39,6 +39,11 @@ return {
"<cmd>Trouble symbols toggle focus=false<cr>", "<cmd>Trouble symbols toggle focus=false<cr>",
desc = "Symbols (Trouble)", desc = "Symbols (Trouble)",
}, },
{
"<leader>xt",
"<cmd>Trouble todo toggle focus=true<cr>",
desc = "Symbols (Trouble)",
},
-- { -- {
-- "<leader>cl", -- "<leader>cl",
-- "<cmd>Trouble lsp toggle focus=false win.position=right<cr>", -- "<cmd>Trouble lsp toggle focus=false win.position=right<cr>",

View File

@@ -19,4 +19,6 @@ vim.keymap.set("n", "Q", "<nop>")
vim.keymap.set("n", "q:", "<nop>") vim.keymap.set("n", "q:", "<nop>")
vim.cmd [[call nvim_create_user_command('W', 'w', {'nargs': 0})]] vim.cmd [[call nvim_create_user_command('W', 'w', {'nargs': 0})]]
vim.keymap.set("n", "QQ", ":q!<CR>")
-- vim.keymap.set("n", "<leader>cb", [[:up | %bd | e#<CR>]]) -- vim.keymap.set("n", "<leader>cb", [[:up | %bd | e#<CR>]])

View File

@@ -60,3 +60,5 @@ let &efm .= '%-Z%*\s--> %f:%l:%c,'
]] ]]
end end
}) })
vim.opt.exrc = true

View File

@@ -13,7 +13,7 @@ local d = ls.dynamic_node
local fmt = require("luasnip.extras.fmt").fmt local fmt = require("luasnip.extras.fmt").fmt
local fmta = require("luasnip.extras.fmt").fmta local fmta = require("luasnip.extras.fmt").fmta
local rep = require("luasnip.extras").rep local rep = require("luasnip.extras").rep
local line_begin = require("luasnip.extras.expand_conditions").line_begin local conds = require("luasnip.extras.expand_conditions")
--------------- ---------------
-- Environments -- Environments
@@ -90,7 +90,7 @@ s({trig="notes"},
) )
), ),
s({trig="beg"}, s({trig="beg", wordTrig=true, snippetType="autosnippet", condition=conds.line_begin},
fmta( fmta(
[[ [[
\begin{<>} \begin{<>}
@@ -105,6 +105,46 @@ s({trig="beg"},
) )
), ),
s({trig="item", wordTrig=true, snippetType="autosnippet",
condition = function(line_to_cursor, matched_trigger, captures)
return tex_utils.in_env("itemize") and conds.line_begin(line_to_cursor, matched_trigger, captures)
end},
fmta(
[[
\item <>
]],
{
i(0),
}
)
),
s({trig="item", wordTrig=true, snippetType="autosnippet", condition=conds.line_begin},
fmta(
[[
\begin{itemize}
\item <>
\end{itemize}
]],
{
i(0),
}
)
),
s({trig="frame", wordTrig=true, snippetType="autosnippet", condition=conds.line_begin},
fmta(
[[
\begin{frame}
\frametitle{<>}
\end{frame}
]],
{
i(0),
}
)
),
s({trig="sec"}, s({trig="sec"},
fmta( fmta(
[[ [[

View File

@@ -13,6 +13,7 @@ local d = ls.dynamic_node
local fmt = require("luasnip.extras.fmt").fmt local fmt = require("luasnip.extras.fmt").fmt
local fmta = require("luasnip.extras.fmt").fmta local fmta = require("luasnip.extras.fmt").fmta
local rep = require("luasnip.extras").rep local rep = require("luasnip.extras").rep
local conds = require("luasnip.extras.expand_conditions")
--------------- ---------------
@@ -56,7 +57,7 @@ end
return { return {
s({trig="ali", snippetType="autosnippet"}, s({trig="ali", wordTrig=true, snippetType="autosnippet", condition=conds.line_begin},
fmta( fmta(
[[ [[
\begin{align*} \begin{align*}
@@ -113,6 +114,21 @@ s({trig="matp"},
{condition = tex_utils.in_mathzone} {condition = tex_utils.in_mathzone}
), ),
s({trig="([^%a])array", regTrig=true, wordTrig=false, snippetType="autosnippet"},
fmta(
[[
<>\begin{array}{c}
<>
\end{array}
]],
{
f( function(_, snip) return snip.captures[1] end ),
i(0),
}
),
{condition = tex_utils.in_mathzone}
),
s({trig='([^%a])int', regTrig=true, wordTrig=false, snippetType="autosnippet"}, s({trig='([^%a])int', regTrig=true, wordTrig=false, snippetType="autosnippet"},
fmta( fmta(
[[<>\int_{<>}^{<>} <> d<> ]], [[<>\int_{<>}^{<>} <> d<> ]],
@@ -228,13 +244,13 @@ s({trig="([^%a])tt", regTrig=true, wordTrig=false, snippetType="autosnippet"},
{condition = tex_utils.in_mathzone} {condition = tex_utils.in_mathzone}
), ),
s({trig=".", snippetType="autosnippet"}, -- s({trig=".", snippetType="autosnippet"},
fmta( -- fmta(
[[\cdot ]], -- [[\cdot ]],
{} -- {}
), -- ),
{condition = tex_utils.in_mathzone} -- {condition = tex_utils.in_mathzone}
), -- ),
s({trig="$$", snippetType="autosnippet"}, s({trig="$$", snippetType="autosnippet"},
fmta( fmta(

View File

@@ -18,7 +18,7 @@ bindsym Control+Mod1+l exec $lock
bindsym Print exec grim -g "$(slurp -d)" - | wl-copy bindsym Print exec grim -g "$(slurp -d)" - | wl-copy
bindsym $mod+p exec kitty -e /usr/bin/expect -c "spawn python; expect \\"*>>> \\"; send \\"import numpy as np\n\\"; send \\"import sympy as sp\n\\"; interact" bindsym $mod+p exec kitty -e /usr/bin/expect -c "spawn python; expect \\"*>>> \\"; send \\"import numpy as np\n\\"; send \\"import sympy as sp\n\\"; send \\"import torch\n\\"; interact"
bindsym $mod+Return exec $term bindsym $mod+Return exec $term
bindsym $mod+Shift+q kill bindsym $mod+Shift+q kill
bindsym $mod+d exec $menu bindsym $mod+d exec $menu

View File

@@ -2,7 +2,7 @@ input "type:touchpad" {
tap enabled tap enabled
natural_scroll enabled natural_scroll enabled
scroll_factor 0.4 scroll_factor 0.4
dwt disable dwt enable
accel_profile "adaptive" accel_profile "adaptive"
pointer_accel 0 pointer_accel 0
drag enabled drag enabled
@@ -10,7 +10,7 @@ input "type:touchpad" {
} }
input type:keyboard { input type:keyboard {
xkb_layout de(nodeadkeys),gr,de(neo) xkb_layout de(nodeadkeys),us,gr
xkb_options grp:ctrls_toggle,caps:escape xkb_options grp:ctrls_toggle,caps:escape
} }

View File

@@ -1,7 +1,7 @@
set $ws1 "1: Dev" set $ws1 "1: Dev"
set $ws2 "2: Firefox" set $ws2 "2: Firefox"
set $ws3 "3: Management" set $ws3 "3: Management"
set $ws4 "4" set $ws4 "4: Mehscellaneous"
set $ws5 "5: Doc" set $ws5 "5: Doc"
set $ws6 "6: 3D-Printing" set $ws6 "6: 3D-Printing"
set $ws7 "7: Music" set $ws7 "7: Music"
@@ -41,7 +41,12 @@ exec swaymsg 'workspace $ws2; exec firefox'
# #
set $this_disp "eDP-1" set $this_disp "eDP-1"
set $other_disp "DP-11" set $other_disp "DP-3"
# set $this_disp "eDP-1"
# set $other_disp "DP-3"
# output edP-1 mode 1920x1080@120Hz
# output edP-1
workspace $ws1 output $other_disp $this_disp workspace $ws1 output $other_disp $this_disp
workspace $ws2 output $this_disp workspace $ws2 output $this_disp

View File

@@ -39,7 +39,7 @@ alias ....="cd ../../.."
export PATH=$PATH:/home/andreas/.local/bin export PATH=$PATH:/home/andreas/.local/bin
export EDITOR=nvim export EDITOR=nvim
alias get-idf='. $HOME/ext_sw/esp-idf/export.sh' alias get-idf='. $HOME/ext-sw/esp-idf/export.sh'
alias c='cd ~/.dotfiles' alias c='cd ~/.dotfiles'
alias sc='cd ~/.config/sway && nvim' alias sc='cd ~/.config/sway && nvim'
@@ -47,7 +47,7 @@ alias nc='cd ~/.config/nvim && nvim'
alias flog='nvim -c "Flog -all"' alias flog='nvim -c "Flog -all"'
alias bin='cd ~/.local/bin && nvim' alias bin='cd ~/.local/bin && nvim'
. "$HOME/.cargo/env" export PATH=$PATH:"$HOME/.cargo/bin"
eval "$(zoxide init zsh)" eval "$(zoxide init zsh)"
eval "$(thefuck --alias)" eval "$(thefuck --alias)"
@@ -55,3 +55,7 @@ eval "$(thefuck --alias)"
. "/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" . "/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"
bindkey '^l' autosuggest-accept bindkey '^l' autosuggest-accept
# . "$HOME/.cargo/env"
# export PYENV_ROOT="$HOME/.pyenv"
# [[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
# eval "$(pyenv init - zsh)"