summaryrefslogtreecommitdiff
path: root/nvim/lua/autocommands.lua
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--nvim/lua/autocommands.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/nvim/lua/autocommands.lua b/nvim/lua/autocommands.lua
index 0e95ee4..f0733f3 100644
--- a/nvim/lua/autocommands.lua
+++ b/nvim/lua/autocommands.lua
@@ -82,6 +82,7 @@ vim.api.nvim_create_autocmd("BufEnter", {
return
end
vim.schedule(function()
+ vim.cmd("nohlsearch")
local treeapi = require("nvim-tree.api")
treeapi.tree.find_file({
update_root = false,
@@ -134,6 +135,17 @@ vim.api.nvim_create_autocmd({ "VimEnter" }, {
require("nvim-tree.api").tree.open()
end,
})
+vim.api.nvim_create_autocmd("FileType", {
+ pattern = "go",
+ callback = function()
+ vim.opt_local.expandtab = false
+ vim.opt_local.tabstop = 4
+ vim.opt_local.shiftwidth = 4
+ vim.opt_local.autoindent = true
+ vim.opt_local.smartindent = true
+ vim.opt_local.cindent = false
+ end,
+})
-- vim.api.nvim_create_autocmd("InsertEnter", {
-- pattern = "*",
-- command = "set norelativenumber",