Add Format command to neovim

This commit is contained in:
Warren Hood 2022-11-10 02:08:11 +02:00
parent 2bb4a47edd
commit bc7e0a5247
3 changed files with 10 additions and 3 deletions

View file

@ -5,3 +5,4 @@ require("warrenhood.mason-config")
require("warrenhood.cmp-config")
require("warrenhood.theme")
require("warrenhood.keybinds")
require("warrenhood.commands")

View file

@ -0,0 +1,2 @@
-- Format file
vim.cmd "silent! command! Format lua vim.lsp.buf.format()"

View file

@ -4,10 +4,14 @@ local g = vim.g
-- General stuff
o.number = true
o.relativenumber = true
o.autoindent = true
o.tabstop = 2
o.shiftwidth = 0
o.softtabstop = -1
o.tabstop = 4
o.shiftwidth = 4
o.softtabstop = 4
o.smartindent = true
o.expandtab = true
-- Make clipboard work with neovim
o.clipboard = 'unnamedplus'