Compare commits

...

10 commits

Author SHA1 Message Date
f1c82d8b8b Adjust light mode swapping 2025-01-15 22:09:30 -05:00
790cb6846b Update iron.nvim settings 2025-01-09 08:58:18 -05:00
Alex Selimov
28794e5404 Remove lsp_lines and fix pythong ftplugin 2025-01-08 21:24:13 -05:00
Alex Selimov
b5e18433a1 Add lsp_lines to nvim 2025-01-07 12:53:00 -05:00
Alex Selimov
f77edb0163 Add trouble.nvim 2024-12-12 19:49:35 -05:00
98bc388c4a Add toggle to keep light mode based on terminal colorscheme 2024-11-11 21:59:14 -05:00
41d85c9f70 Update to zenwritten 2024-11-11 19:27:19 -05:00
022a8b9800 Change to zenbones colorscheme 2024-11-10 14:49:50 -05:00
Alex Selimov
4b220023f7 Add rainbow csv plugin 2024-11-06 09:01:50 -05:00
Alex Selimov
d8a0641fb8 Add taplo and some snips 2024-11-05 22:27:59 -05:00
3 changed files with 118 additions and 8 deletions

View file

@ -11,7 +11,8 @@ map <C-b> : w % <Bar> AsyncRun md2pdf "%" <CR>
map <A-p> : w % <Bar> AsyncRun md2beamer "%" <CR> map <A-p> : w % <Bar> AsyncRun md2beamer "%" <CR>
map <A-b> : w % <Bar> AsyncRun md2docx % <CR> map <A-b> : w % <Bar> AsyncRun md2docx % <CR>
map <C-z> : !zathura %:r.pdf & <CR> map <C-z> : !zathura %:r.pdf & <CR>
inoremap ;b ****<esc>hi inoremap <leader>b ****<esc>hi
inoremap <leader>i **<esc>i
command Stab Tabularize /\s\+\zs\s/l1c0 command Stab Tabularize /\s\+\zs\s/l1c0
nnoremap ;t :Tabularize /\s\+\zs\s/l1c0<CR> nnoremap ;t :Tabularize /\s\+\zs\s/l1c0<CR>
set tw=1000 set tw=1000

View file

@ -1,3 +1,3 @@
set colorcolumn=100 set colorcolumn=100
nmap ;x [hv]h]hk$;sc nmap ;x [hv]h]hk$;sc
set tw=100 set tw=1000

121
init.lua
View file

@ -205,6 +205,7 @@ require("lazy").setup({
}, },
"christoomey/vim-tmux-navigator", "christoomey/vim-tmux-navigator",
"kana/vim-textobj-user", "kana/vim-textobj-user",
"mechatroner/rainbow_csv",
{ {
"GCBallesteros/vim-textobj-hydrogen", "GCBallesteros/vim-textobj-hydrogen",
dependencies = { dependencies = {
@ -260,7 +261,7 @@ require("lazy").setup({
highlight = { highlight = {
italic = true, italic = true,
}, },
ignore_blank_lines = true, -- ignore blank lines when sending visual select lines ignore_blank_lines = false, -- ignore blank lines when sending visual select lines
}) })
vim.keymap.set("n", ";rs", "<cmd>IronRepl<cr>") vim.keymap.set("n", ";rs", "<cmd>IronRepl<cr>")
vim.keymap.set("n", ";rr", "<cmd>IronRestart<cr>") vim.keymap.set("n", ";rr", "<cmd>IronRestart<cr>")
@ -270,6 +271,7 @@ require("lazy").setup({
repl_open_cmd = "horizontal bot 20 split" repl_open_cmd = "horizontal bot 20 split"
end, end,
}, },
"norcalli/nvim-colorizer.lua",
"ixru/nvim-markdown", "ixru/nvim-markdown",
"KeitaNakamura/tex-conceal.vim", "KeitaNakamura/tex-conceal.vim",
"christoomey/vim-tmux-navigator", "christoomey/vim-tmux-navigator",
@ -446,6 +448,7 @@ require("lazy").setup({
"cpp", "cpp",
}, },
}, },
taplo = {},
yamlls = {}, yamlls = {},
-- gopls = {}, -- gopls = {},
jdtls = { jdtls = {
@ -475,6 +478,7 @@ require("lazy").setup({
}, },
}, },
}, },
arduino_language_server = {},
ltex = { ltex = {
settings = { settings = {
ltex = { ltex = {
@ -553,7 +557,6 @@ require("lazy").setup({
"stylua", -- Used to format lua code "stylua", -- Used to format lua code
"black", "black",
"clang-format", "clang-format",
"ormolu",
"beautysh", "beautysh",
"latexindent", "latexindent",
"prettier", "prettier",
@ -681,6 +684,20 @@ require("lazy").setup({
insert(2), insert(2),
text(")"), text(")"),
}), }),
snip({
trig = "header",
namr = "header",
dscr = "Yaml header for markdown notes",
}, {
text({ "---", "" }),
text("title: "),
insert(1),
text({ "", "author: Alex Selimov", "" }),
text("tags: ["),
insert(2),
text({ "]", "", "" }),
text({ "---", "" }),
}),
}, },
}) })
end, end,
@ -745,18 +762,18 @@ require("lazy").setup({
end, end,
}, },
}, },
{ -- You can easily change to a different colorscheme. { -- You can easily change to a different colorscheme.
-- Change the name of the colorscheme plugin below, and then -- Change the name of the colorscheme plugin below, and then
-- change the command in the config to whatever the name of that colorscheme is -- change the command in the config to whatever the name of that colorscheme is
-- --
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme` -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`
"morhetz/gruvbox",
lazy = false, -- make sure we load this during startup if it is your main colorscheme lazy = false, -- make sure we load this during startup if it is your main colorscheme
priority = 1000, -- make sure to load this before all the other start plugins priority = 1000, -- make sure to load this before all the other start plugins
"zenbones-theme/zenbones.nvim",
dependencies = "rktjmp/lush.nvim",
config = function() config = function()
-- Load the colorscheme here -- Load the colorscheme here
vim.cmd.colorscheme("gruvbox") vim.cmd.colorscheme("zenwritten")
end, end,
}, },
@ -820,8 +837,83 @@ require("lazy").setup({
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
end, end,
}, },
{
"folke/snacks.nvim",
priority = 1000,
lazy = false,
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
dashboard = { enabled = true },
input = { enabled = true },
terminal = { enabled = true },
},
keys = {
{
"<leader>T",
function()
Snacks.terminal()
end,
desc = "Toggle Terminal",
},
},
},
"airblade/vim-gitgutter", "airblade/vim-gitgutter",
"tpope/vim-abolish",
{
"danymat/neogen",
setup = {
snippet_engine = "luasnip",
},
config = function()
require("neogen").setup({})
local opts = { noremap = true, silent = true }
vim.api.nvim_set_keymap("n", "<Leader>dg", ":lua require('neogen').generate()<CR>", opts)
end,
version = "*",
},
"dhruvasagar/vim-table-mode",
{
"folke/trouble.nvim",
opts = {}, -- for default options, refer to the configuration section for custom setup.
cmd = "Trouble",
keys = {
{
"<leader>xx",
"<cmd>Trouble diagnostics toggle<cr>",
desc = "Diagnostics (Trouble)",
},
{
"<leader>xX",
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
desc = "Buffer Diagnostics (Trouble)",
},
{
"<leader>cs",
"<cmd>Trouble symbols toggle focus=false<cr>",
desc = "Symbols (Trouble)",
},
{
"<leader>cl",
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
desc = "LSP Definitions / references / ... (Trouble)",
},
{
"<leader>xL",
"<cmd>Trouble loclist toggle<cr>",
desc = "Location List (Trouble)",
},
{
"<leader>xQ",
"<cmd>Trouble qflist toggle<cr>",
desc = "Quickfix List (Trouble)",
},
},
},
}) })
require("colorizer").setup()
--Set rustfmt command --Set rustfmt command
vim.g["rustfmt_command"] = "rustfmt +nightly" vim.g["rustfmt_command"] = "rustfmt +nightly"
--Disable semantic highlights --Disable semantic highlights
@ -836,7 +928,14 @@ vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
vim.bo.filetype = "scorch" vim.bo.filetype = "scorch"
end, end,
}) })
--
--Testing scorch highlighting
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
pattern = "*.sep",
callback = function()
vim.bo.filetype = "sep"
end,
})
-- Commands to disable formatting -- Commands to disable formatting
require("conform").setup({ require("conform").setup({
format_on_save = function(bufnr) format_on_save = function(bufnr)
@ -865,3 +964,13 @@ vim.api.nvim_create_user_command("FormatEnable", function()
end, { end, {
desc = "Re-enable autoformat-on-save", desc = "Re-enable autoformat-on-save",
}) })
function file_exists(name)
local f = io.open(name, "r")
return f ~= nil and io.close(f)
end
local home = os.getenv("HOME")
if file_exists(home .. "/.config/nvim/light_mode") then
vim.opt.background = "light"
end