updating nvim config. - dotfiles - These are my dotfiles. There are many like it, but these are mine.
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit 8c0be770ed72f2459fb2a701d9909178f111c92c
(DIR) parent bee752b8d87c5679b3e8af65c68e573c982aecbd
(HTM) Author: Jay Scott <me@jay.scot>
Date: Mon, 22 Jan 2024 08:44:31 +0000
updating nvim config.
Diffstat:
M nvim/init.lua | 43 ++++++++++++++++++++-----------
1 file changed, 28 insertions(+), 15 deletions(-)
---
(DIR) diff --git a/nvim/init.lua b/nvim/init.lua
@@ -13,7 +13,7 @@ if not vim.loop.fs_stat(lazypath) then
end
vim.opt.rtp:prepend(lazypath)
---- plugins
+--- plug-ins
require("lazy").setup({
@@ -55,6 +55,13 @@ require("lazy").setup({
config = function()
require'spaceless'.setup()
end
+ },
+
+ {
+ "nvim-telescope/telescope.nvim",
+ dependencies = {
+ "nvim-lua/plenary.nvim"
+ }
}
})
@@ -66,28 +73,34 @@ vim.opt.number = true
vim.opt.showmatch = true
vim.opt.swapfile = false
vim.opt.ignorecase = true
-vim.o.spelllang = 'en_gb'
-vim.o.spell = true
-vim.o.spelloptions = "camel"
+vim.opt.spelllang = 'en_gb'
+vim.opt.spell = true
+vim.opt.spelloptions = "camel"
+
+-- indent
+vim.opt.expandtab = true
+vim.opt.shiftwidth = 2
+vim.opt.tabstop = 2
+vim.opt.autoindent = true
+vim.opt.wrap = true
-- show space and tab characters
vim.o.list = true
-vim.o.listchars = 'tab:› ,eol:¬,trail:⋅,nbsp:␣'
+vim.o.listchars = 'tab:› ,trail:⋅,nbsp:␣'
--- map leader to <Space>
+-- map leader to <space>
vim.keymap.set("n", " ", "<Nop>", { silent = true, remap = false })
vim.g.mapleader = " "
--- format paragraphs
-vim.keymap.set('n', '<leader>f', 'gqap', { noremap = true, silent = true })
+-- open file_browser with the path of the current buffer
+vim.keymap.set('n', '<leader>ff', ':Telescope find_files<CR>', { noremap = true })
--- indent Settings
-vim.opt.expandtab = true
-vim.opt.shiftwidth = 2
-vim.opt.tabstop = 2
-vim.opt.autoindent = true
-vim.opt.wrap = true
+-- open buffers list
+vim.keymap.set('n', '<leader>fb', ':Telescope buffers<CR>', { noremap = true })
+-- format paragraphs
+vim.keymap.set('n', '<leader>t', 'gqap', { noremap = true, silent = true })
---- functions
+-- enable spellchecking
+vim.keymap.set('n', '<leader>s', ':setlocal spell! spelllang=en_gb<CR>', { noremap = true, silent = true })