qol
This commit is contained in:
parent
8931468772
commit
d02e16803e
2 changed files with 91 additions and 78 deletions
9
init.lua
9
init.lua
|
@ -1,5 +1,10 @@
|
||||||
vim.cmd("nnoremap <Space> <Nop>")
|
vim.cmd("nnoremap <Space> <Nop>")
|
||||||
|
|
||||||
vim.g.mapleader = ' '
|
vim.g.mapleader = ' '
|
||||||
vim.cmd("set shiftwidth=4")
|
|
||||||
vim.cmd("set nu")
|
vim.cmd("set tabstop=4")
|
||||||
|
vim.cmd("set softtabstop=0")
|
||||||
|
vim.cmd("set shiftwidth=0")
|
||||||
|
|
||||||
|
vim.opt.nu = true
|
||||||
require("Dario48/lazy")
|
require("Dario48/lazy")
|
||||||
|
|
|
@ -13,7 +13,10 @@ return {
|
||||||
{
|
{
|
||||||
'williamboman/mason.nvim',
|
'williamboman/mason.nvim',
|
||||||
lazy = false,
|
lazy = false,
|
||||||
config = true,
|
config = function ()
|
||||||
|
require("mason").setup()
|
||||||
|
vim.keymap.set("n", "<leader>m", ":Mason <CR>")
|
||||||
|
end
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Autocompletion
|
-- Autocompletion
|
||||||
|
@ -33,6 +36,10 @@ return {
|
||||||
local cmp_action = lsp_zero.cmp_action()
|
local cmp_action = lsp_zero.cmp_action()
|
||||||
|
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
|
sources = {
|
||||||
|
{name = 'nvim_lsp'},
|
||||||
|
{name = 'nvim_lua'},
|
||||||
|
},
|
||||||
formatting = lsp_zero.cmp_format(),
|
formatting = lsp_zero.cmp_format(),
|
||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert({
|
||||||
['<C-Space>'] = cmp.mapping.complete(),
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
|
@ -63,6 +70,7 @@ return {
|
||||||
lsp_zero.on_attach(function(client, bufnr)
|
lsp_zero.on_attach(function(client, bufnr)
|
||||||
-- see :help lsp-zero-keybindings
|
-- see :help lsp-zero-keybindings
|
||||||
-- to learn the available actions
|
-- to learn the available actions
|
||||||
|
vim.keymap.set("n", "gd", function () vim.lsp.buf.definition() end, {buffer = bufnr, remap = false})
|
||||||
lsp_zero.default_keymaps({buffer = bufnr})
|
lsp_zero.default_keymaps({buffer = bufnr})
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue