feat(nvim): minor updates across the board

This commit is contained in:
winston 2022-12-19 17:50:02 +01:00
parent 2312545a63
commit f80e3568be
Signed by: winston
GPG key ID: 3786770EDBC2B481
4 changed files with 15 additions and 19 deletions

View file

@ -1,4 +1,5 @@
require("bufferline").setup({
highlights = require("catppuccin.groups.integrations.bufferline").get(),
options = {
show_close_icon = false,
separator_style = "thin",

View file

@ -45,7 +45,6 @@ require("catppuccin").setup({
colored_indent_levels = true,
},
barbar = false,
bufferline = true,
dashboard = false,
fern = false,
gitgutter = false,
@ -101,7 +100,7 @@ require("catppuccin").setup({
mantle = "#020202",
},
},
transparent_background = true,
transparent_background = false,
})
vim.api.nvim_command("colorscheme catppuccin")

View file

@ -25,10 +25,10 @@ local has_words_before = function()
---@diagnostic disable-next-line: deprecated
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0
and vim.api
.nvim_buf_get_lines(0, line - 1, line, true)[1]
:sub(col, col)
:match("%s")
and vim.api
.nvim_buf_get_lines(0, line - 1, line, true)[1]
:sub(col, col)
:match("%s")
== nil
end
@ -240,7 +240,7 @@ lspconfig.bashls.setup({
on_attach = on_attach,
})
-- data
-- data {{{
lspconfig.jsonls.setup({
capabilities = capabilities,
on_attach = on_attach,
@ -272,7 +272,7 @@ lspconfig.yamlls.setup({
schemas = {
["https://json.schemastore.org/github-action"] = ".github/action.{yaml,yml}",
["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://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json"] = "docker-compose.yml.{yml,yaml}",
-- stylua: ignore
@ -292,7 +292,9 @@ lspconfig.yamlls.setup({
},
},
})
-- }}}
-- Latex {{{
lspconfig.ltex.setup({
capabilities = capabilities,
on_attach = function(client, bufnr)
@ -307,7 +309,9 @@ lspconfig.ltex.setup({
ltex = {},
},
})
-- }}}
-- Null LS {{{
local null = require("null-ls")
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
@ -342,6 +346,7 @@ local toggle_formatters = function()
end
vim.api.nvim_create_user_command("ToggleFormatters", toggle_formatters, {})
-- }}}
-- go (with nvim-go) {{{
require("go").setup({

View file

@ -13,12 +13,6 @@ vim.api.nvim_create_autocmd("BufWritePost", {
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({
function(use)
-- Packer managing itself
@ -48,7 +42,6 @@ return packer.startup({
config = function()
require("config/gitsigns")
end,
cond = check_git,
})
-- rainbow indents
use({
@ -165,13 +158,11 @@ return packer.startup({
-- git
use({
"tpope/vim-fugitive",
cond = check_git,
})
-- why not both?
use({
"TimUntersberger/neogit",
requires = "nvim-lua/plenary.nvim",
cond = check_git,
config = function()
Map("n", "<leader>ng", "<Cmd>Neogit<CR>")
end,
@ -222,8 +213,8 @@ return packer.startup({
end,
})
use({
'axkirillov/easypick.nvim',
requires = 'nvim-telescope/telescope.nvim'
"axkirillov/easypick.nvim",
requires = "nvim-telescope/telescope.nvim",
})
use("nvim-tree/nvim-web-devicons")