Compare commits

..

2 commits

Author SHA1 Message Date
Bruno BELANYI bf20ca501e home: vim: lspconfig: migrate to 'ruff'
All checks were successful
ci/woodpecker/push/check Pipeline was successful
This replaces and enhances the experience from the old `ruff-lsp`
wrapper.
2024-05-23 11:28:42 +00:00
Bruno BELANYI eebcc1f0ed overlays: add 'gruvbox-nvim-delimiters'
All checks were successful
ci/woodpecker/push/check Pipeline was successful
To fix [1] and [2] until the plug-in gets bumped.

[1]: https://github.com/ellisonleao/gruvbox.nvim/issues/335
[2]: https://github.com/ellisonleao/gruvbox.nvim/issues/340
2024-05-20 15:13:46 +00:00
11 changed files with 67 additions and 3 deletions

View file

@ -0,0 +1,7 @@
" Create the `b:undo_ftplugin` variable if it doesn't exist
call ftplugined#check_undo_ft()
" Add comment format
setlocal comments=b://,s1:/*,mb:*,ex:*/
setlocal commentstring=//\ %s
let b:undo_ftplugin.='|setlocal comments< commentstring<'

View file

@ -0,0 +1,10 @@
local wk = require("which-key")
local keys = {
name = "Comment/uncomment",
c = "Current line",
u = "Uncomment the current and adjacent commented lines",
["gc"] = "Uncomment the current and adjacent commented lines",
}
wk.register(keys, { prefix = "gc" })

View file

@ -40,6 +40,7 @@ in
lualine-lsp-progress # Show progress for LSP servers lualine-lsp-progress # Show progress for LSP servers
# tpope essentials # tpope essentials
vim-commentary # Easy comments
vim-eunuch # UNIX integrations vim-eunuch # UNIX integrations
vim-fugitive # A 'git' wrapper vim-fugitive # A 'git' wrapper
vim-git # Sane git syntax files vim-git # Sane git syntax files
@ -57,6 +58,7 @@ in
# General enhancements # General enhancements
vim-qf # Better quick-fix list vim-qf # Better quick-fix list
nvim-osc52 # Send clipboard data through terminal escape for SSH
# Other wrappers # Other wrappers
git-messenger-vim # A simple blame window git-messenger-vim # A simple blame window
@ -68,6 +70,7 @@ in
none-ls-nvim # LSP integration for linters and formatters none-ls-nvim # LSP integration for linters and formatters
nvim-treesitter.withAllGrammars # Better highlighting nvim-treesitter.withAllGrammars # Better highlighting
nvim-treesitter-textobjects # More textobjects nvim-treesitter-textobjects # More textobjects
nvim-ts-context-commentstring # Comment string in nested language blocks
plenary-nvim # 'null-ls', 'telescope' dependency plenary-nvim # 'null-ls', 'telescope' dependency
# Completion # Completion

View file

@ -0,0 +1,6 @@
-- Use `bp` filetype for Blueprint files
vim.filetype.add({
extension = {
bp = "bp",
},
})

View file

@ -0,0 +1,7 @@
-- Use GN filetype for Chromium Generate Ninja files
vim.filetype.add({
extension = {
gn = "gn",
gni = "gn",
},
})

View file

@ -0,0 +1,6 @@
-- Kbuild is just a Makefile under a different name
vim.filetype.add({
filename = {
["Kbuild"] = "make",
},
})

View file

@ -0,0 +1,6 @@
-- Use LaTeX filetype for TikZ files
vim.filetype.add({
extension = {
tikz = "tex",
},
})

View file

@ -86,6 +86,8 @@ set mouse=
" Set dark mode by default " Set dark mode by default
set background=dark set background=dark
" 24 bit colors
set termguicolors
" Setup some overrides for gruvbox " Setup some overrides for gruvbox
lua << EOF lua << EOF
local gruvbox = require("gruvbox") local gruvbox = require("gruvbox")

View file

@ -53,8 +53,8 @@ if utils.is_executable("pyright") then
}) })
end end
if utils.is_executable("ruff-lsp") then if utils.is_executable("ruff") then
lspconfig.ruff_lsp.setup({ lspconfig.ruff.setup({
capabilities = capabilities, capabilities = capabilities,
on_attach = lsp.on_attach, on_attach = lsp.on_attach,
}) })

View file

@ -0,0 +1,17 @@
if not require("ambroisie.utils").is_ssh() then
return
end
local function copy(lines, _)
require("osc52").copy(table.concat(lines, "\n"))
end
local function paste()
return { vim.fn.split(vim.fn.getreg(""), "\n"), vim.fn.getregtype("") }
end
vim.g.clipboard = {
name = "osc52",
copy = { ["+"] = copy, ["*"] = copy },
paste = { ["+"] = paste, ["*"] = paste },
}

View file

@ -7,7 +7,7 @@ _final: prev: {
(fetchpatch { (fetchpatch {
name = "add-Delimiter-highlight-group.patch"; name = "add-Delimiter-highlight-group.patch";
url = "https://github.com/ellisonleao/gruvbox.nvim/commit/20f90039564b293330bf97acc36dda8dd9e721a0.patch"; url = "https://github.com/ellisonleao/gruvbox.nvim/commit/20f90039564b293330bf97acc36dda8dd9e721a0.patch";
hash = "sha256-it4SbgK/2iDVyvtXBfVW2YN9DqELfKsMkuCaunERGcE="; hash = "";
}) })
]; ];
}); });