Compare commits

...

4 commits

Author SHA1 Message Date
Enrique MP 181e959337 grouping prefixes 2023-10-07 18:27:19 +02:00
Enrique MP 90262cdec1 enable spell checking for some filetypes 2023-10-07 18:26:33 +02:00
Enrique MP ab6f21bd07 function to show spell indicator 2023-10-07 18:25:37 +02:00
Enrique MP 582f5ac594 updates 2023-10-07 18:25:02 +02:00
4 changed files with 36 additions and 1 deletions

View file

@ -1,5 +1,5 @@
local cmd = vim.cmd -- execute vim commands
local ag = vim.api.nvim_create_autogroup -- create autogroup
local ag = vim.api.nvim_create_augroup -- create autogroup
local au = vim.api.nvim_create_autocmd -- create autocommand
-- don't autocommenting new lines
@ -20,3 +20,12 @@ au({ "InsertLeave", "WinEnter" }, {
group = cursorGrp,
})
au({ "InsertEnter", "WinLeave" }, { pattern = "*", command = "set nocursorline", group = cursorGrp })
-- Enable spell checking for certain file types
au({ "BufRead", "BufNewFile" }, {
pattern = { "*.txt", "*.md" },
callback = function()
vim.opt_local.spell = true
vim.opt_local.spelllang = "en,es"
end,
})

View file

@ -49,6 +49,14 @@ return {
},
}
-- spell indicator
local function spell()
if vim.wo.spell == true then
return "[" .. vim.bo.spelllang .. "]"
end
return ""
end
-- configure lualine with modified theme
lualine.setup({
options = {
@ -61,6 +69,7 @@ return {
cond = lazy_status.has_updates,
color = { fg = "#ff9e64" },
},
{ spell },
{ "encoding" },
{ "fileformat" },
{ "filetype" },

View file

@ -9,5 +9,21 @@ return {
-- yoru configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
groups = {
mode = { "n", "v" },
["<leader>b"] = { name = "Buffers" },
["<leader>c"] = { name = "Code" },
["<leader>e"] = { name = "Explorer" },
["<leader>f"] = { name = "Find" },
["<leader>r"] = { name = "Lsp" },
["<leader>s"] = { name = "Splits" },
["<leader>t"] = { name = "Tabs" },
["<leader>w"] = { name = "Workspace" },
},
},
config = function(_, opts)
local wk = require("which-key")
wk.setup(opts)
wk.register(opts.groups)
end,
}

View file

@ -1 +1,2 @@
Riera
?