From 74e201e92c31658eb6d7dcb56e1fdd6fdc43b2e4 Mon Sep 17 00:00:00 2001 From: Alexander Neonxp Kiryukhin Date: Sun, 4 May 2025 17:43:55 +0300 Subject: =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=BA=D1=83=D1=87=D0=BA=D1=83=20=D0=BD=D0=B5=D0=B4=D0=BE=D1=81?= =?UTF-8?q?=D1=82=D0=B0=D1=82=D0=BA=D0=BE=D0=B2=20=D0=B2=20neovim?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nvim/lua/autocommands.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'nvim/lua/autocommands.lua') 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", -- cgit v1.2.3