Fix CSS lint

This commit is contained in:
ggdawson 2024-03-18 13:44:53 -06:00
parent 963a65f9bb
commit 7028a2adb1
4 changed files with 75 additions and 36 deletions

View file

@ -110,7 +110,7 @@ require('lazy').setup({
},
-- Useful plugin to show you pending keybinds.
{ 'folke/which-key.nvim', opts = {} },
{ 'folke/which-key.nvim', opts = {} },
{
-- Adds git related signs to the gutter, as well as utilities for managing changes
@ -129,16 +129,16 @@ require('lazy').setup({
-- don't override the built-in and fugitive keymaps
local gs = package.loaded.gitsigns
vim.keymap.set({'n', 'v'}, ']c', function()
vim.keymap.set({ 'n', 'v' }, ']c', function()
if vim.wo.diff then return ']c' end
vim.schedule(function() gs.next_hunk() end)
return '<Ignore>'
end, {expr=true, buffer = bufnr, desc = "Jump to next hunk"})
vim.keymap.set({'n', 'v'}, '[c', function()
end, { expr = true, buffer = bufnr, desc = "Jump to next hunk" })
vim.keymap.set({ 'n', 'v' }, '[c', function()
if vim.wo.diff then return '[c' end
vim.schedule(function() gs.prev_hunk() end)
return '<Ignore>'
end, {expr=true, buffer = bufnr, desc = "Jump to previous hunk"})
end, { expr = true, buffer = bufnr, desc = "Jump to previous hunk" })
end,
},
},
@ -176,7 +176,7 @@ require('lazy').setup({
},
-- "gc" to comment visual regions/lines
{ 'numToStr/Comment.nvim', opts = {} },
{ 'numToStr/Comment.nvim', opts = {} },
-- Fuzzy Finder (files, lsp, etc)
@ -335,10 +335,10 @@ vim.defer_fn(function()
require('nvim-treesitter.configs').setup {
-- Add languages to be installed here that you want installed for treesitter
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim' },
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
auto_install = false,
highlight = { enable = true },
indent = { enable = true },
incremental_selection = {
@ -406,6 +406,17 @@ vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagn
-- [[ Configure LSP ]]
-- This function gets run when an LSP connects to a particular buffer.
local on_attach = function(_, bufnr)
-- @TODO: Move custom defs to `after/plugin/defaults.lua`
local original_handler = vim.lsp.handlers["textDocument/definition"]
vim.lsp.handlers["textDocument/definition"] = function(err, result, ctx, config)
if result and vim.tbl_islist(result) and #result > 1 then
-- This handles multiple definitions. For example, jump to the first definition:
original_handler(err, { result[1] }, ctx, config)
else
-- Call the original handler otherwise
original_handler(err, result, ctx, config)
end
end
-- NOTE: Remember that lua is a real programming language, and as such it is possible
-- to define small helper and utility functions so you don't have to repeat yourself
-- many times.