Skip to content

Commit

Permalink
chore(neovim): formatting and misc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
olimorris committed Nov 25, 2023
1 parent 20d9cb8 commit 74a1094
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 34 deletions.
22 changes: 16 additions & 6 deletions .config/nvim/lua/config/autocmds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ return {
]]

local ok, ts_query = pcall(vim.treesitter.query.parse, "html", query)
if not ok then return om.dd(ts_query) end
if not ok then
return om.dd(ts_query)
end

for _, captures, metadata in ts_query:iter_matches(root, bufnr, root:start(), root:end_(), {}) do
local start_row, start_col, end_row, end_col = captures[2]:range()
Expand Down Expand Up @@ -62,7 +64,9 @@ return {
local buf = args.buf
local buftype = vim.tbl_contains({ "prompt", "nofile", "help", "quickfix" }, vim.bo[buf].buftype)
local filetype = vim.tbl_contains({ "", "alpha", "gitcommit", "fugitive" }, vim.bo[buf].filetype)
if buftype or filetype then vim.opt_local.winbar = nil end
if buftype or filetype then
vim.opt_local.winbar = nil
end
end,
opts = { pattern = "HeirlineInitWinbar" },
},
Expand Down Expand Up @@ -103,7 +107,9 @@ return {
name = "GitTrackRemoteBranch",
{
{ "TermLeave" },
function() om.GitRemoteSync() end,
function()
om.GitRemoteSync()
end,
opts = {
pattern = { "*" },
},
Expand All @@ -112,7 +118,9 @@ return {
{ "VimEnter" },
function()
local timer = vim.loop.new_timer()
timer:start(0, 120000, function() om.GitRemoteSync() end)
timer:start(0, 120000, function()
om.GitRemoteSync()
end)
end,
opts = {
pattern = { "*" },
Expand All @@ -137,7 +145,7 @@ return {
},
{
"FileType",
":setlocal wrap linebreak",
":setlocal wrap linebreak formatoptions-=t",
opts = { pattern = "markdown" },
},
{
Expand Down Expand Up @@ -240,7 +248,9 @@ return {
name = "HighlightYankedText",
{
"TextYankPost",
function() vim.highlight.on_yank() end,
function()
vim.highlight.on_yank()
end,
opts = { pattern = "*" },
},
},
Expand Down
19 changes: 0 additions & 19 deletions .config/nvim/lua/plugins/editor.lua
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
return {
{
"cameron-wags/rainbow_csv.nvim",
config = true,
ft = {
"csv",
"tsv",
"csv_semicolon",
"csv_whitespace",
"csv_pipe",
"rfc_csv",
"rfc_semicolon",
},
cmd = {
"RainbowDelim",
"RainbowDelimSimple",
"RainbowDelimQuoted",
"RainbowMultiDelim",
},
},
{
--TODO: Add commands and keymaps
"mfussenegger/nvim-jdtls", -- Extensions for nicer Java development in Neovim
Expand Down
5 changes: 4 additions & 1 deletion .config/nvim/lua/plugins/heirline/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ function M.config()
spacer,
statuscolumn.folds,
statuscolumn.git_signs,
-- statuscolumn.line,
},
winbar = {
{
Expand All @@ -117,7 +118,9 @@ function M.config()
filetype = { "alpha", "oil", "lspinfo", "toggleterm" },
})
end,
init = function() vim.opt_local.winbar = nil end,
init = function()
vim.opt_local.winbar = nil
end,
},
winbar.filepath,
winbar.filename,
Expand Down
7 changes: 7 additions & 0 deletions .config/nvim/lua/plugins/heirline/statuscolumn.lua
Original file line number Diff line number Diff line change
Expand Up @@ -229,4 +229,11 @@ M.git_signs = {
},
}

M.line = {
{
provider = "",
hl = "HeirlineStatusColumn",
},
}

return M
7 changes: 3 additions & 4 deletions .config/nvim/lua/plugins/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ return {
build = ":TSUpdate",
dependencies = {
"nvim-treesitter/nvim-treesitter-textobjects", -- Syntax aware text-objects, select, move, swap, and peek support.
"JoosepAlviste/nvim-ts-context-commentstring", -- Smart commenting in multi language files - Enabled in Treesitter file
{
"JoosepAlviste/nvim-ts-context-commentstring", -- Smart commenting in multi language files - Enabled in Treesitter file
},
{
"windwp/nvim-ts-autotag", -- Autoclose and autorename HTML and Vue tags
config = true,
Expand Down Expand Up @@ -64,9 +66,6 @@ return {
-- nvim-treesitter-endwise plugin
endwise = { enable = true },

-- nvim-ts-context-commentstring plugin
context_commentstring = { enable = true },

-- playground
playground = {
enable = true,
Expand Down
12 changes: 9 additions & 3 deletions .config/nvim/lua/plugins/ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,28 @@ return {
{
"folke/edgy.nvim",
event = "VeryLazy",
init = function() vim.opt.splitkeep = "screen" end,
init = function()
vim.opt.splitkeep = "screen"
end,
opts = {
animate = { enabled = false },
bottom = {
{
ft = "lazyterm",
title = "Terminal",
size = { height = om.on_big_screen() and 20 or 0.2 },
filter = function(buf) return not vim.b[buf].lazyterm_cmd end,
filter = function(buf)
return not vim.b[buf].lazyterm_cmd
end,
},
{ ft = "qf", title = "QuickFix" },
{
ft = "help",
size = { height = 20 },
-- only show help buffers
filter = function(buf) return vim.bo[buf].buftype == "help" end,
filter = function(buf)
return vim.bo[buf].buftype == "help"
end,
},
{ title = "Neotest Output", ft = "neotest-output-panel", size = { height = 15 } },
},
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@

# Fish
.config/fish/fish_variables
.config/fish/fish_history

# Tmux
.config/tmux/plugins
Expand Down
4 changes: 3 additions & 1 deletion dotbot.conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
~/.config/efm-langserver: .config/efm-langserver
~/.config/fish: .config/fish
~/.config/hammerspoon: .config/hammerspoon
~/.config/kitty: .config/kitty
~/.config/nvim: .config/nvim
~/.config/rclone: .config/rclone
~/.config/snippets: .config/snippets
Expand All @@ -36,12 +35,15 @@
~/.mackup: .config/mackup/.mackup
~/.mackup.cfg: .config/mackup/.mackup.cfg
~/.profile: .config/bash/.profile
~/.pypirc: .config/.pypirc
~/.ssh: .config/ssh
~/.tofish: .config/fish/.tofish
~/.tool-versions: .tool-versions
~/.vim/custom_snippets: .config/vim/custom_snippets
~/.vimrc: .config/vim/.vimrc
~/.vimrc.plugins: .config/vim/.vimrc.plugins
~/.local/share/fish/fish_history: .config/fish/fish_history


- shell:
- [git submodule update --init --recursive, Installing submodules]

0 comments on commit 74a1094

Please sign in to comment.