keybinds
This commit is contained in:
parent
ea4822b11b
commit
58e7fc2ee1
2 changed files with 51 additions and 22 deletions
66
init.lua
66
init.lua
|
@ -1,12 +1,15 @@
|
|||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
vim.g.mapleader = " "
|
||||
|
||||
local wo = vim.wo
|
||||
local bo = vim.bo
|
||||
local op = vim.opt
|
||||
|
||||
vim.opt.termguicolors = true
|
||||
bo.tabstop = 2
|
||||
bo.shiftwidth = 2
|
||||
op.termguicolors = true
|
||||
op.tabstop = 4
|
||||
op.shiftwidth = 4
|
||||
op.expandtab = true
|
||||
bo.autoindent = true
|
||||
bo.expandtab = true
|
||||
wo.number = 1
|
||||
|
@ -39,7 +42,10 @@ packer.startup(function(use)
|
|||
use 'neovim/nvim-lspconfig'
|
||||
use 'mfussenegger/nvim-dap'
|
||||
use 'jose-elias-alvarez/null-ls.nvim'
|
||||
use 'nvim-telescope/telescope.nvim'
|
||||
use {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
requires = { {'nvim-lua/plenary.nvim'} }
|
||||
}
|
||||
use 'lewis6991/gitsigns.nvim'
|
||||
use 'williamboman/mason.nvim'
|
||||
use 'williamboman/mason-lspconfig.nvim'
|
||||
|
@ -182,7 +188,7 @@ require('lspconfig')['rust_analyzer'].setup{
|
|||
["rust-analyzer"] = {}
|
||||
}
|
||||
}
|
||||
require'lspconfig'.sumneko_lua.setup {
|
||||
require'lspconfig'.lua_ls.setup {
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
|
@ -207,7 +213,7 @@ require'lspconfig'.sumneko_lua.setup {
|
|||
|
||||
require'lspconfig'.omnisharp.setup {
|
||||
capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities()),
|
||||
cmd = { "dotnet", "/home/nya/.vscode-oss/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/.omnisharp/1.39.2-net6.0/OmniSharp.dll" },
|
||||
cmd = { "/home/nya/.local/share/nvim/mason/bin/omnisharp" },
|
||||
|
||||
-- Enables support for reading code style, naming convention and analyzer
|
||||
-- settings from .editorconfig.
|
||||
|
@ -246,7 +252,7 @@ require'lspconfig'.omnisharp.setup {
|
|||
}
|
||||
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = { "sumneko_lua", "rust_analyzer" }
|
||||
ensure_installed = { "lua_ls", "rust_analyzer" }
|
||||
})
|
||||
|
||||
local cmp = require('cmp')
|
||||
|
@ -322,28 +328,40 @@ cmp.setup {
|
|||
}
|
||||
|
||||
require("nvim-tree").setup({
|
||||
open_on_setup = true,
|
||||
sort_by = "case_sensitive",
|
||||
view = {
|
||||
adaptive_size = true,
|
||||
mappings = {
|
||||
list = {
|
||||
{ key = "u", action = "dir_up" },
|
||||
},
|
||||
},
|
||||
},
|
||||
renderer = {
|
||||
group_empty = true,
|
||||
},
|
||||
filters = {
|
||||
dotfiles = true,
|
||||
dotfiles = false,
|
||||
},
|
||||
})
|
||||
|
||||
require("indent_blankline").setup {
|
||||
show_current_context = true,
|
||||
show_current_context_start = true,
|
||||
}
|
||||
local hooks = require "ibl.hooks"
|
||||
-- create the highlight groups in the highlight setup hook, so they are reset
|
||||
-- every time the colorscheme changes
|
||||
hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
|
||||
vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" })
|
||||
vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" })
|
||||
vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" })
|
||||
vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" })
|
||||
vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" })
|
||||
vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" })
|
||||
vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" })
|
||||
end)
|
||||
|
||||
require("ibl").setup { indent = { highlight = {
|
||||
"RainbowRed",
|
||||
"RainbowYellow",
|
||||
"RainbowBlue",
|
||||
"RainbowOrange",
|
||||
"RainbowGreen",
|
||||
"RainbowViolet",
|
||||
"RainbowCyan",
|
||||
} } }
|
||||
|
||||
require('colorizer').setup()
|
||||
require("bufferline").setup {
|
||||
|
@ -406,5 +424,15 @@ require('lualine').setup {
|
|||
extensions = {}
|
||||
}
|
||||
|
||||
vim.api.nvim_set_keymap('n', '<C-t>', ':NvimTreeFocus<CR>', { noremap = true })
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
|
||||
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
|
||||
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
|
||||
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
|
||||
|
||||
--vim.api.nvim_set_keymap('n', '<C-Tab>', ':BufferLineCyclePrev<CR>', { noremap = true })--
|
||||
vim.api.nvim_set_keymap('n', '<S-Tab>', ':BufferLineCycleNext<CR>', { noremap = true })
|
||||
|
||||
vim.api.nvim_set_keymap('n', '<C-`>', ':NvimTreeToggle<CR>', { noremap = true })
|
||||
vim.api.nvim_set_keymap('n', '<A-t>', ':TroubleToggle<CR>', { noremap = true })
|
||||
vim.api.nvim_set_keymap('n', '<A-CR>', ':CodeActionMenu<CR>', { noremap = true })
|
||||
|
|
|
@ -27,5 +27,6 @@
|
|||
"/usr/lib/nvim",
|
||||
"/usr/share/vim/vimfiles",
|
||||
"${3rd}/luassert/library"
|
||||
]
|
||||
],
|
||||
"workspace.checkThirdParty": false
|
||||
}
|
Loading…
Reference in a new issue