feat(nvim): minor updates across the board
This commit is contained in:
parent
2312545a63
commit
f80e3568be
4 changed files with 15 additions and 19 deletions
|
@ -1,4 +1,5 @@
|
||||||
require("bufferline").setup({
|
require("bufferline").setup({
|
||||||
|
highlights = require("catppuccin.groups.integrations.bufferline").get(),
|
||||||
options = {
|
options = {
|
||||||
show_close_icon = false,
|
show_close_icon = false,
|
||||||
separator_style = "thin",
|
separator_style = "thin",
|
||||||
|
|
|
@ -45,7 +45,6 @@ require("catppuccin").setup({
|
||||||
colored_indent_levels = true,
|
colored_indent_levels = true,
|
||||||
},
|
},
|
||||||
barbar = false,
|
barbar = false,
|
||||||
bufferline = true,
|
|
||||||
dashboard = false,
|
dashboard = false,
|
||||||
fern = false,
|
fern = false,
|
||||||
gitgutter = false,
|
gitgutter = false,
|
||||||
|
@ -101,7 +100,7 @@ require("catppuccin").setup({
|
||||||
mantle = "#020202",
|
mantle = "#020202",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
transparent_background = true,
|
transparent_background = false,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_command("colorscheme catppuccin")
|
vim.api.nvim_command("colorscheme catppuccin")
|
||||||
|
|
|
@ -25,10 +25,10 @@ local has_words_before = function()
|
||||||
---@diagnostic disable-next-line: deprecated
|
---@diagnostic disable-next-line: deprecated
|
||||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||||
return col ~= 0
|
return col ~= 0
|
||||||
and vim.api
|
and vim.api
|
||||||
.nvim_buf_get_lines(0, line - 1, line, true)[1]
|
.nvim_buf_get_lines(0, line - 1, line, true)[1]
|
||||||
:sub(col, col)
|
:sub(col, col)
|
||||||
:match("%s")
|
:match("%s")
|
||||||
== nil
|
== nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -240,7 +240,7 @@ lspconfig.bashls.setup({
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- data
|
-- data {{{
|
||||||
lspconfig.jsonls.setup({
|
lspconfig.jsonls.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
|
@ -272,7 +272,7 @@ lspconfig.yamlls.setup({
|
||||||
schemas = {
|
schemas = {
|
||||||
["https://json.schemastore.org/github-action"] = ".github/action.{yaml,yml}",
|
["https://json.schemastore.org/github-action"] = ".github/action.{yaml,yml}",
|
||||||
["https://json.schemastore.org/github-workflow"] = ".github/workflows/*",
|
["https://json.schemastore.org/github-workflow"] = ".github/workflows/*",
|
||||||
["https://json.schemastore.org/gitlab-ci"] = "*lab-ci.{yaml,yml}",
|
["https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json"] = "*lab-ci.{yaml,yml}",
|
||||||
["https://json.schemastore.org/helmfile"] = "helmfile.{yaml,yml}",
|
["https://json.schemastore.org/helmfile"] = "helmfile.{yaml,yml}",
|
||||||
["https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json"] = "docker-compose.yml.{yml,yaml}",
|
["https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json"] = "docker-compose.yml.{yml,yaml}",
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
|
@ -292,7 +292,9 @@ lspconfig.yamlls.setup({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
-- }}}
|
||||||
|
|
||||||
|
-- Latex {{{
|
||||||
lspconfig.ltex.setup({
|
lspconfig.ltex.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
|
@ -307,7 +309,9 @@ lspconfig.ltex.setup({
|
||||||
ltex = {},
|
ltex = {},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
-- }}}
|
||||||
|
|
||||||
|
-- Null LS {{{
|
||||||
local null = require("null-ls")
|
local null = require("null-ls")
|
||||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
||||||
|
|
||||||
|
@ -342,6 +346,7 @@ local toggle_formatters = function()
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("ToggleFormatters", toggle_formatters, {})
|
vim.api.nvim_create_user_command("ToggleFormatters", toggle_formatters, {})
|
||||||
|
-- }}}
|
||||||
|
|
||||||
-- go (with nvim-go) {{{
|
-- go (with nvim-go) {{{
|
||||||
require("go").setup({
|
require("go").setup({
|
||||||
|
|
|
@ -13,12 +13,6 @@ vim.api.nvim_create_autocmd("BufWritePost", {
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
local function check_git()
|
|
||||||
local is_repo = vim.fn.filereadable(vim.fn.getcwd() .. "/.git") == 1
|
|
||||||
local git_exists = vim.fn.executable("git") == 1
|
|
||||||
return is_repo and git_exists
|
|
||||||
end
|
|
||||||
|
|
||||||
return packer.startup({
|
return packer.startup({
|
||||||
function(use)
|
function(use)
|
||||||
-- Packer managing itself
|
-- Packer managing itself
|
||||||
|
@ -48,7 +42,6 @@ return packer.startup({
|
||||||
config = function()
|
config = function()
|
||||||
require("config/gitsigns")
|
require("config/gitsigns")
|
||||||
end,
|
end,
|
||||||
cond = check_git,
|
|
||||||
})
|
})
|
||||||
-- rainbow indents
|
-- rainbow indents
|
||||||
use({
|
use({
|
||||||
|
@ -165,13 +158,11 @@ return packer.startup({
|
||||||
-- git
|
-- git
|
||||||
use({
|
use({
|
||||||
"tpope/vim-fugitive",
|
"tpope/vim-fugitive",
|
||||||
cond = check_git,
|
|
||||||
})
|
})
|
||||||
-- why not both?
|
-- why not both?
|
||||||
use({
|
use({
|
||||||
"TimUntersberger/neogit",
|
"TimUntersberger/neogit",
|
||||||
requires = "nvim-lua/plenary.nvim",
|
requires = "nvim-lua/plenary.nvim",
|
||||||
cond = check_git,
|
|
||||||
config = function()
|
config = function()
|
||||||
Map("n", "<leader>ng", "<Cmd>Neogit<CR>")
|
Map("n", "<leader>ng", "<Cmd>Neogit<CR>")
|
||||||
end,
|
end,
|
||||||
|
@ -222,8 +213,8 @@ return packer.startup({
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
use({
|
use({
|
||||||
'axkirillov/easypick.nvim',
|
"axkirillov/easypick.nvim",
|
||||||
requires = 'nvim-telescope/telescope.nvim'
|
requires = "nvim-telescope/telescope.nvim",
|
||||||
})
|
})
|
||||||
|
|
||||||
use("nvim-tree/nvim-web-devicons")
|
use("nvim-tree/nvim-web-devicons")
|
||||||
|
|
Loading…
Reference in a new issue