Skip to content

Commit

Permalink
various minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
brightpuddle committed Nov 6, 2023
1 parent 2a95c9d commit a3b1f69
Show file tree
Hide file tree
Showing 12 changed files with 93 additions and 63 deletions.
1 change: 1 addition & 0 deletions .config/nvim/init.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
vim.loader.enable()
require("config.options")
require("config.keymaps")
require("config.filetype")

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
Expand Down
77 changes: 39 additions & 38 deletions .config/nvim/lazy-lock.json
Original file line number Diff line number Diff line change
@@ -1,65 +1,66 @@
{
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
"LazyVim": { "branch": "main", "commit": "566049aa4a26a86219dd1ad1624f9a1bf18831b6" },
"LuaSnip": { "branch": "master", "commit": "e81cbe6004051c390721d8570a4a0541ceb0df10" },
"LazyVim": { "branch": "main", "commit": "e5babf289c5ccd91bcd068bfc623335eb76cbc1f" },
"LuaSnip": { "branch": "master", "commit": "80a8528f084a97b624ae443a6f50ff8074ba486b" },
"Navigator.nvim": { "branch": "master", "commit": "91d86506ac2a039504d5205d32a1d4bc7aa57072" },
"Vim-Jinja2-Syntax": { "branch": "master", "commit": "2c17843b074b06a835f88587e1023ceff7e2c7d1" },
"better-escape.nvim": { "branch": "master", "commit": "7031dc734add47bb71c010e0551829fa5799375f" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
"copilot.lua": { "branch": "master", "commit": "e48bd7020a98be217d85c006a298656294fd6210" },
"dressing.nvim": { "branch": "master", "commit": "829bc80400651aea31b03d8fc9a99135512fe67a" },
"feline.nvim": { "branch": "main", "commit": "c32c2ffcee38f14e157582552fa9ee41c24452d2" },
"flash.nvim": { "branch": "main", "commit": "967117690bd677cb7b6a87f0bc0077d2c0be3a27" },
"gitsigns.nvim": { "branch": "main", "commit": "5d73da785a3c05fd63ac31769079db05169a6ec7" },
"go.nvim": { "branch": "master", "commit": "7e5602dd51a230581f43c42559d7acc2fbca23cf" },
"guihua.lua": { "branch": "master", "commit": "9a15128d92dfba57ada2857316073d1fa3d97c93" },
"indent-blankline.nvim": { "branch": "master", "commit": "4541d690816cb99a7fc248f1486aa87f3abce91c" },
"lazy.nvim": { "branch": "main", "commit": "dac844ed617dda4f9ec85eb88e9629ad2add5e05" },
"lsp-zero.nvim": { "branch": "v2.x", "commit": "73bc33fe9ad5a1d4501536fdd4755b3aa18c3392" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"copilot.lua": { "branch": "master", "commit": "688762a3999eeee54b78f447719854f52672ec02" },
"dressing.nvim": { "branch": "master", "commit": "1f2d1206a03bd3add8aedf6251e4534611de577f" },
"feline.nvim": { "branch": "main", "commit": "ee9f8afdbe8654001b200530903f1dcbcc3394e6" },
"flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" },
"gitsigns.nvim": { "branch": "main", "commit": "af0f583cd35286dd6f0e3ed52622728703237e50" },
"go.nvim": { "branch": "master", "commit": "8732792d9c30a113188f85f75c19f0effd199881" },
"guihua.lua": { "branch": "master", "commit": "9c3e3ba03ac65782e950bd21434bbbfe8dfb6f50" },
"indent-blankline.nvim": { "branch": "master", "commit": "29be0919b91fb59eca9e90690d76014233392bef" },
"lazy.nvim": { "branch": "main", "commit": "16603c6917435d8446f7357cb61095138a417085" },
"lsp-zero.nvim": { "branch": "v3.x", "commit": "c36c34c289e42f924760a6ea092329582d5f81b2" },
"lspkind.nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "e86a4c84ff35240639643ffed56ee1c4d55f538e" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "40301e1c74bc0946eece13edf2b1c561cc497491" },
"mason-null-ls.nvim": { "branch": "main", "commit": "ae0c5fa57468ac65617f1bf821ba0c3a1e251f0c" },
"mason.nvim": { "branch": "main", "commit": "fe9e34a9ab4d64321cdc3ecab4ea1809239bb73f" },
"mason.nvim": { "branch": "main", "commit": "cd7835b15f5a4204fc37e0aa739347472121a54c" },
"neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" },
"neotest": { "branch": "master", "commit": "bec7be0f13ee19c85561943fc5f7b8daa4f4d465" },
"neotest": { "branch": "master", "commit": "901891484db3d46ce43d56871273dc7d40621356" },
"nginx.vim": { "branch": "master", "commit": "8a42e93c9f004fbc5b32bb2e4940107fb7b70a42" },
"nui.nvim": { "branch": "main", "commit": "9e3916e784660f55f47daa6f26053ad044db5d6a" },
"null-ls.nvim": { "branch": "main", "commit": "db09b6c691def0038c456551e4e2772186449f35" },
"nvim-autopairs": { "branch": "master", "commit": "ae5b41ce880a6d850055e262d6dfebd362bb276e" },
"nui.nvim": { "branch": "main", "commit": "c0c8e347ceac53030f5c1ece1c5a5b6a17a25b32" },
"null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
"nvim-autopairs": { "branch": "master", "commit": "0f04d78619cce9a5af4f355968040f7d675854a1" },
"nvim-bufdel": { "branch": "main", "commit": "96c4f7ab053ddab0025bebe5f7c71e4795430e47" },
"nvim-cmp": { "branch": "main", "commit": "c4e491a87eeacf0408902c32f031d802c7eafce8" },
"nvim-cokeline": { "branch": "main", "commit": "0d2988c6eff6c58dfc04b08639ae5ff04a21b32c" },
"nvim-cmp": { "branch": "main", "commit": "51260c02a8ffded8e16162dcf41a23ec90cfba62" },
"nvim-cokeline": { "branch": "main", "commit": "2e71292a37535fdbcf0f9500aeb141021d90af8b" },
"nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" },
"nvim-dap": { "branch": "master", "commit": "1c63f37f95cd4fb54512898168138d9a75d1516a" },
"nvim-dap-ui": { "branch": "master", "commit": "85b16ac2309d85c88577cd8ee1733ce52be8227e" },
"nvim-lspconfig": { "branch": "master", "commit": "a59d74e12340242c0735666fb2e91afdbe6f2496" },
"nvim-surround": { "branch": "main", "commit": "10b20ca7d9da1ac8df8339e140ffef94f9ab3b18" },
"nvim-treesitter": { "branch": "master", "commit": "131f665f9008d69d130f76f77603886e75c4b146" },
"nvim-dap": { "branch": "master", "commit": "79dbc70eb79271ad801e4ff293887cde324c28d0" },
"nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" },
"nvim-lspconfig": { "branch": "master", "commit": "d0467b9574b48429debf83f8248d8cee79562586" },
"nvim-surround": { "branch": "main", "commit": "4f0e1f470595af067eca9b872778d83c7f52f134" },
"nvim-treesitter": { "branch": "master", "commit": "a8c14d68b024ffc20baec92d1acc91796bcfb485" },
"nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" },
"nvim-web-devicons": { "branch": "master", "commit": "efbfed0567ef4bfac3ce630524a0f6c8451c5534" },
"oil.nvim": { "branch": "master", "commit": "eaa20a6aee7c4df89d80ec8208de63ec2fa4d38a" },
"playground": { "branch": "master", "commit": "2b81a018a49f8e476341dfcb228b7b808baba68b" },
"plenary.nvim": { "branch": "master", "commit": "267282a9ce242bbb0c5dc31445b6d353bed978bb" },
"nvim-web-devicons": { "branch": "master", "commit": "5de460ca7595806044eced31e3c36c159a493857" },
"oil.nvim": { "branch": "master", "commit": "05a80e24f6c920e29ed741d12ede0840e456a3e4" },
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
"rest.nvim": { "branch": "main", "commit": "b8d6c0a8762fd374e0204768a94241135ca3e311" },
"robotframework-vim": { "branch": "master", "commit": "75d5b371a4da2a090a2872d55bd0dead013f334e" },
"rust-tools.nvim": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" },
"sad.nvim": { "branch": "master", "commit": "869c7f3ca3dcd28fd78023db6a7e1bf8af0f4714" },
"smart-open.nvim": { "branch": "0.2.x", "commit": "20ac086494a6dda649b0cfb255565e8b248d0550" },
"smart-open.nvim": { "branch": "0.2.x", "commit": "026091fe7f9b283aa1f5f4bb8c56aa5bcad43dbd" },
"sqlite.lua": { "branch": "master", "commit": "b7e28c8463254c46a8e61c52d27d6a2040492fc3" },
"tabular": { "branch": "master", "commit": "339091ac4dd1f17e225fe7d57b48aff55f99b23a" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" },
"telescope.nvim": { "branch": "master", "commit": "d2e17ba18a6840b7e7079764b282616c3188e0de" },
"todo-comments.nvim": { "branch": "main", "commit": "3094ead8edfa9040de2421deddec55d3762f64d1" },
"trouble.nvim": { "branch": "main", "commit": "40aad004f53ae1d1ba91bcc5c29d59f07c5f01d3" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
"telescope.nvim": { "branch": "master", "commit": "4522d7e3ea75ffddabdc39957168a8a7060b5df0" },
"todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" },
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
"vim": { "branch": "main", "commit": "f13f5dfbb784deddbc1d8195f34dfd9ec73e2295" },
"vim-commentary": { "branch": "master", "commit": "e87cd90dc09c2a203e13af9704bd0ef79303d755" },
"vim-js": { "branch": "master", "commit": "90f340d31907590fad059cd9aab03a55ab49e352" },
"vim-jsx-pretty": { "branch": "master", "commit": "6989f1663cc03d7da72b5ef1c03f87e6ddb70b41" },
"vim-markdown": { "branch": "master", "commit": "cc82d88e2a791f54d2b6e2b26e41f743351ac947" },
"vim-markdown": { "branch": "master", "commit": "4e9b4deda11d05a157ab34e97f76089669b5b7af" },
"vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" },
"vim-terraform": { "branch": "master", "commit": "2bbc5f65a80c79a5110494a2ba1b869075fcf7a0" },
"which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" }
"vim-terraform": { "branch": "master", "commit": "d37ae7e7828aa167877e338dea5d4e1653ed3eb1" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
}
5 changes: 5 additions & 0 deletions .config/nvim/lua/config/filetype.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
vim.filetype.add({
filename = {
["Jenkinsfile"] = "groovy",
},
})
7 changes: 4 additions & 3 deletions .config/nvim/lua/plugins/cokeline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ return {
event = "BufEnter",
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
local get_hex = require("cokeline/utils").get_hex
local hlgroups = require("cokeline.hlgroups")
local C = {
active = {
fg = "#d8dee9",
Expand All @@ -17,6 +17,7 @@ return {
fg = "#d8dee9",
}
require("cokeline").setup({
fill_hl = "Normal",
show_if_buffers_are_at_least = 2,
buffers = {
-- filter_valid = function(buffer) -> true | false,
Expand Down Expand Up @@ -89,8 +90,8 @@ return {
components = {
{
text = " NeoTree",
fg = get_hex("NeoTreeNormal", "fg"),
bg = get_hex("NeoTeeNormal", "bg"),
fg = hlgroups.get_hl_attr("NeoTreeNormal", "fg"),
bg = hlgroups.get_hl_attr("NeoTeeNormal", "bg"),
style = "bold",
},
},
Expand Down
39 changes: 24 additions & 15 deletions .config/nvim/lua/plugins/lsp.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
return {
"VonHeikemen/lsp-zero.nvim",
branch = "v2.x",
branch = "v3.x",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"neovim/nvim-lspconfig",
Expand Down Expand Up @@ -30,21 +30,25 @@ return {
})
end,
config = function()
-- Sign column icons
local signs = { Error = "", Warn = "", Hint = "", Info = "" }
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
end

local lsp = require("lsp-zero").preset({})
local lsp_zero = require("lsp-zero")
-- Buffer attach function
lsp.on_attach(function(_, bufnr)
lsp.default_keymaps({ buffer = bufnr })
lsp_zero.on_attach(function(_, bufnr)
lsp_zero.default_keymaps({
buffer = bufnr,
preserve_mappings = false,
})
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, { buffer = bufnr })
end)

lsp.format_on_save({
-- Sign column icons
lsp_zero.set_sign_icons({
error = "",
warn = "",
hint = "",
info = "»",
})

lsp_zero.format_on_save({
format_opts = {
async = false,
timeout_ms = 10000,
Expand All @@ -69,8 +73,12 @@ return {
["robotframework_ls"] = { "robot" },
},
})
-- require("mason").setup()
-- require("mason-lspconfig").setup()
require("mason").setup({})
require("mason-lspconfig").setup({
handlers = {
lsp_zero.default_setup,
},
})

local lspconfig = require("lspconfig")
lspconfig.lua_ls.setup({
Expand All @@ -86,7 +94,7 @@ return {
},
})

lsp.setup()
-- lsp_zero.setup()
local null_ls = require("null-ls")
require("mason-null-ls").setup({
ensure_installed = {
Expand Down Expand Up @@ -118,6 +126,7 @@ return {
"yaml",
},
}),
null_ls.builtins.formatting.rome.with({ command = "biome" }),
null_ls.builtins.formatting.rustfmt, -- Rust
null_ls.builtins.formatting.shfmt, -- Shell
null_ls.builtins.formatting.stylua, -- Lua
Expand Down
7 changes: 7 additions & 0 deletions .config/nvim/lua/plugins/rest.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
return {
"rest-nvim/rest.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
require("rest-nvim").setup({})
end,
}
1 change: 1 addition & 0 deletions .config/nvim/lua/plugins/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ return {
enable = true,
},
})
vim.treesitter.language.register("groovy", "Jenkinsfile")
end,
}
6 changes: 6 additions & 0 deletions .config/nvim/lua/plugins/whichkey.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ return {
k = { "<cmd>NavigatorUp<cr>", "Window up" },
l = { "<cmd>NavigatorRight<cr>", "Window right" },
},
r = {
name = "Rest",
x = { "<plug>RestNvim<cr>", "Execute Request" },
p = { "<plug>RestNvimPreview<cr>", "Preview Request" },
l = { "<plug>RestNvimLast<cr>", "Repeat Last Request" },
},
},
})
end,
Expand Down
Loading

0 comments on commit a3b1f69

Please sign in to comment.