Reformatted code after changing indent width to 2, TODO highlighting
- set all indent widths from 4 to 2 - added plugin to highlight TODO markers, can also be searched <leader>ft
This commit is contained in:
@@ -6,16 +6,17 @@ vim.keymap.set('n', '<leader>fg', fzf.live_grep, { desc = "Grep" })
|
||||
vim.keymap.set('n', '<leader>fG', fzf.grep_cword, { desc = "Grep word under cursor" })
|
||||
vim.keymap.set('n', '<leader>fc', fzf.commands, { desc = "Commands" })
|
||||
vim.keymap.set('n', '<leader>fm', fzf.manpages, { desc = "Manpages" })
|
||||
|
||||
vim.keymap.set('n', '<leader>b', fzf.buffers, { desc = "Buffers" })
|
||||
|
||||
vim.keymap.set('n', '<leader>ft', ":TodoFzfLua<CR>", { desc = "Todos" })
|
||||
|
||||
-- use fzf buffer lines as default search
|
||||
vim.keymap.set('n', '/', fzf.blines, { desc = "Search buffer" })
|
||||
vim.keymap.set('n', 'z=', fzf.spell_suggest, { desc = "Spelling suggestions" })
|
||||
|
||||
-- open file manager and git
|
||||
vim.keymap.set('n', '<leader>g', ":Neogit<CR>", { desc = "Git Manager" })
|
||||
vim.keymap.set('n', '<leader>T', ":Neotree<CR>", { desc = "File Manager" })
|
||||
vim.keymap.set('n', '<leader>g', ":Neogit<CR>", { desc = "Neogit" })
|
||||
vim.keymap.set('n', '<leader>T', ":Neotree reveal<CR>", { desc = "File Manager" })
|
||||
|
||||
--
|
||||
-- configure workspaces
|
||||
|
||||
@@ -15,9 +15,10 @@ require('mason-lspconfig').setup({
|
||||
'lua_ls',
|
||||
'rust_analyzer',
|
||||
'yamlls',
|
||||
'tsserver',
|
||||
'ts_ls',
|
||||
'gopls',
|
||||
'pylsp',
|
||||
'clangd',
|
||||
-- 'volar',
|
||||
},
|
||||
})
|
||||
@@ -58,7 +59,7 @@ local on_attach = function(client, bufnr)
|
||||
-- 2024-09-09 - some ccflow commands
|
||||
|
||||
local fzf = require('fzf-lua')
|
||||
vim.keymap.set('n', '<space>d', fzf.diagnostics_document , { desc = "Doc diagnostics" })
|
||||
vim.keymap.set('n', '<space>d', fzf.diagnostics_document, { desc = "Doc diagnostics" })
|
||||
vim.keymap.set('n', '<space>D', fzf.diagnostics_workspace, { desc = "Workspace diagnostics" })
|
||||
vim.keymap.set('n', '<space>s', fzf.lsp_document_symbols, { desc = "Doc symbols" })
|
||||
vim.keymap.set('n', '<space>c', fzf.lsp_code_actions, { desc = "Code Actions" })
|
||||
@@ -80,7 +81,7 @@ require('mason-lspconfig').setup_handlers({
|
||||
-- and will be called for each installed server that doesn't have
|
||||
-- a dedicated handler.
|
||||
function(server_name) -- default handler (optional)
|
||||
if server_name == 'tsserver' then
|
||||
if server_name == 'ts_ls' then
|
||||
-- taken from https://github.com/vuejs/language-tools
|
||||
-- If you are using mason.nvim, you can get the ts_plugin_path like this
|
||||
local mason_registry = require('mason-registry')
|
||||
|
||||
@@ -4,9 +4,9 @@ vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
|
||||
vim.opt.mouse = 'a' -- allow the mouse to be used in Nvim
|
||||
|
||||
-- Tab
|
||||
vim.opt.tabstop = 4 -- number of visual spaces per TAB
|
||||
vim.opt.softtabstop = 4 -- number of spacesin tab when editing
|
||||
vim.opt.shiftwidth = 4 -- insert 4 spaces on a tab
|
||||
vim.opt.tabstop = 2 -- number of visual spaces per TAB
|
||||
vim.opt.softtabstop = 2 -- number of spacesin tab when editing
|
||||
vim.opt.shiftwidth = 2 -- insert 4 spaces on a tab
|
||||
vim.opt.expandtab = true -- tabs are spaces, mainly because of python
|
||||
|
||||
-- UI config
|
||||
|
||||
@@ -104,6 +104,12 @@ require("lazy").setup({
|
||||
scroll_down = "<c-d>", -- binding to scroll down inside the popup
|
||||
scroll_up = "<c-u>", -- binding to scroll up inside the popup
|
||||
},
|
||||
plugins = {
|
||||
presets = {
|
||||
motions = true,
|
||||
g = true,
|
||||
}
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
@@ -114,6 +120,7 @@ require("lazy").setup({
|
||||
desc = "Buffer Local Keymaps (which-key)",
|
||||
},
|
||||
},
|
||||
dependencies = { "echasnovski/mini.icons" },
|
||||
},
|
||||
|
||||
-- treesitter
|
||||
@@ -225,4 +232,15 @@ require("lazy").setup({
|
||||
|
||||
-- comfortable table editing
|
||||
{ 'dhruvasagar/vim-table-mode' },
|
||||
|
||||
-- TODO, WARN, HACK, PERF, NOTE, TEST and others highlighting and searching
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
opts = {
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user