Changed some keymaps for macros
This commit is contained in:
@ -50,4 +50,8 @@ local M = Mapper.map
|
||||
-- For Neovim >= 0.7.0
|
||||
M('n', '<leader>P', ":MarkdownPreview<CR>", {silent = true, noremap = true}, "Markdown", "md_preview", "Display Markdown preview in Qutebrowser")
|
||||
M('n', '<leader>fe', ":Telescope file_browser<CR>", {silent=true, noremap=true}, "Telescope", "telescope-file-browser", "Find files and directories in telescope")
|
||||
M('n', '<C-t>', "@t<CR>",{silent=true, noremap=true}, "Todo Comments", "todo_hotkey", "Add TODO to the beginning of the line")
|
||||
M('n', '<C-t>', "@t<CR>",{silent=true, noremap=true}, "Todo Comments", "todo_todo", "Add To-do/Task to the beginning of the line")
|
||||
M('n', '<C-s>', "@s<CR>", {silent=true, noremap=true}, "Todo Comments", "todo_seng", "Add Solutions Engineering to the beginning of the line")
|
||||
M('n', '<C-f>', "@f<CR>", {silent=true, noremap=true}, "Todo Comments", "todo_feat", "Add Feature Request tag to the beginning of the line. ")
|
||||
M('n', '<C-cx>', "@c<CR>", {silent=true, noremap=true}, "Todo Comments", "todo_complete", "Replace tag with Complete tag at beginning of the line.")
|
||||
M('n', '<C-w>', "@w<CR>", {silent=true, noremap=true}, "Todo Comments", "todo_error", "Add Warning/Error tag at the beginning of the line.")
|
||||
|
||||
@ -4,10 +4,6 @@
|
||||
|
||||
-- Plugin: nvim-lspconfig
|
||||
-- url: https://github.com/neovim/nvim-lspconfig
|
||||
|
||||
-- For configuration see the Wiki: https://github.com/neovim/nvim-lspconfig/wiki
|
||||
-- Autocompletion settings of "nvim-cmp" are defined in plugins/nvim-cmp.lua
|
||||
|
||||
local lsp_status_ok, lspconfig = pcall(require, 'lspconfig')
|
||||
if not lsp_status_ok then
|
||||
return
|
||||
@ -36,26 +32,6 @@ vim.cmd([[
|
||||
autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, { focus = false })
|
||||
]])
|
||||
|
||||
-- Add additional capabilities supported by nvim-cmp
|
||||
-- See: https://github.com/neovim/nvim-lspconfig/wiki/Autocompletion
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = cmp_nvim_lsp.update_capabilities(capabilities)
|
||||
|
||||
capabilities.textDocument.completion.completionItem.documentationFormat = { 'markdown', 'plaintext' }
|
||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||
capabilities.textDocument.completion.completionItem.preselectSupport = true
|
||||
capabilities.textDocument.completion.completionItem.insertReplaceSupport = true
|
||||
capabilities.textDocument.completion.completionItem.labelDetailsSupport = true
|
||||
capabilities.textDocument.completion.completionItem.deprecatedSupport = true
|
||||
capabilities.textDocument.completion.completionItem.commitCharactersSupport = true
|
||||
capabilities.textDocument.completion.completionItem.tagSupport = { valueSet = { 1 } }
|
||||
capabilities.textDocument.completion.completionItem.resolveSupport = {
|
||||
properties = {
|
||||
'documentation',
|
||||
'detail',
|
||||
'additionalTextEdits',
|
||||
},
|
||||
}
|
||||
|
||||
-- Use an on_attach function to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
@ -63,16 +39,6 @@ local on_attach = function(client, bufnr)
|
||||
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
|
||||
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
|
||||
|
||||
-- Highlighting references
|
||||
if client.resolved_capabilities.document_highlight then
|
||||
vim.api.nvim_exec([[
|
||||
augroup lsp_document_highlight
|
||||
autocmd! * <buffer>
|
||||
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
|
||||
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
|
||||
augroup END
|
||||
]], false)
|
||||
end
|
||||
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
@ -127,7 +93,7 @@ end
|
||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||
-- map buffer local keybindings when the language server attaches.
|
||||
-- Add your language server below:
|
||||
local servers = { 'bashls', 'pyright', 'clangd', 'html', 'cssls', 'tsserver', 'jedi-language-server' }
|
||||
local servers = { 'bashls', 'pyright', 'clangd', 'html', 'cssls', 'tsserver'}
|
||||
|
||||
-- Call setup
|
||||
for _, lsp in ipairs(servers) do
|
||||
|
||||
@ -14,11 +14,13 @@ return require'packer'.startup(function()
|
||||
-----------------------------------------------------------------
|
||||
|
||||
-- Easy Way to install Language Servers
|
||||
use {
|
||||
'williamboman/mason.nvim',
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
'neovim/nvim-lspconfig',
|
||||
use { 'williamboman/mason.nvim',
|
||||
config = function()
|
||||
require("mason").setup()
|
||||
end
|
||||
}
|
||||
use 'williamboman/mason-lspconfig.nvim'
|
||||
use 'neovim/nvim-lspconfig'
|
||||
|
||||
-- Manage all your Keymaps!
|
||||
use {
|
||||
@ -39,13 +41,13 @@ return require'packer'.startup(function()
|
||||
'hrsh7th/cmp-cmdline',
|
||||
'hrsh7th/nvim-cmp',
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
'hrsh7th/cmp-nvim-lsp-signature-help',
|
||||
'f3fora/cmp-spell',
|
||||
}
|
||||
}
|
||||
use ({
|
||||
'L3MON4D3/LuaSnip',
|
||||
requires = {
|
||||
'saadparwaiz1/cmp_luasnip'
|
||||
}
|
||||
'L3MON4D3/LuaSnip', tag = "v1.1.0",
|
||||
wants = { "friendly-snippets", "vim-snippets" },
|
||||
})
|
||||
|
||||
-- Treesitter interface
|
||||
@ -67,7 +69,7 @@ return require'packer'.startup(function()
|
||||
config = function() require("tmux").setup() end
|
||||
})
|
||||
-- Find & Search LSP Tags
|
||||
--use 'liuchengxu/vista.vim'
|
||||
use 'liuchengxu/vista.vim'
|
||||
|
||||
-- Snippets
|
||||
use 'rafamadriz/friendly-snippets'
|
||||
@ -136,11 +138,12 @@ return require'packer'.startup(function()
|
||||
|
||||
|
||||
-- Markdown Preview
|
||||
--[[ use({
|
||||
"iamcco/markdown-preview.nvim",
|
||||
run = function() vim.fn["mkdp#util#install"]() end,
|
||||
})
|
||||
--]]
|
||||
-- use({
|
||||
-- "iamcco/markdown-preview.nvim",
|
||||
-- run = function() vim.fn["mkdp#util#install"]() end,
|
||||
--})
|
||||
use({ "iamcco/markdown-preview.nvim", run = "cd app && npm install", setup = function() vim.g.mkdp_filetypes = { "markdown" } end, ft = { "markdown" }, })
|
||||
|
||||
|
||||
-- use 'chentoast/marks.nvim'
|
||||
|
||||
@ -170,6 +173,20 @@ return require'packer'.startup(function()
|
||||
requires = "nvim-lua/plenary.nvim",
|
||||
config = function()
|
||||
require('todo-comments').setup({
|
||||
keywords = {
|
||||
FIX = {
|
||||
icon = " ", -- icon used for the sign, and in search results
|
||||
color = "error", -- can be a hex color, or a named color (see below)
|
||||
alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords
|
||||
-- signs = false, -- configure signs for some keywords individually
|
||||
},
|
||||
DONE = { icon = " ", color = "info" },
|
||||
FEAT = { icon = " ", color = "warning", alt = { "NEED", "REQUEST" } },
|
||||
WARN = { icon = " ", color = "warning", alt = { "WARNING", "ERROR" } },
|
||||
TASK = { icon = " ", color = "hint", alt = { "TODO", "TBD" } },
|
||||
NOTE = { icon = " ", color = "hint", alt = { "INFO" } },
|
||||
SENG = { icon = " ", color = "test", alt = { "SOLUTIONS", "SE", "WORKAROUND" } },
|
||||
},
|
||||
highlight = {
|
||||
comments_only = false,
|
||||
},
|
||||
|
||||
@ -27,6 +27,7 @@ g.markdown_folding = 1
|
||||
-- Neovim UI
|
||||
-----------------------------------------------------------
|
||||
opt.number = true -- Show line number
|
||||
opt.relativenumber = true -- Show Current Line with Relative numbers above and below cursor.
|
||||
opt.showmatch = true -- Highlight matching parenthesis
|
||||
opt.foldmethod = 'syntax' -- Enable folding (default 'foldmarker')
|
||||
opt.colorcolumn = '150' -- Line lenght marker at 80 columns
|
||||
|
||||
Reference in New Issue
Block a user