diff --git a/lazy-lock.json b/lazy-lock.json index a089f96..a643e22 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -24,6 +24,7 @@ "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, "nvim-lspconfig": { "branch": "master", "commit": "bdbc65aadc708ce528efb22bca5f82a7cca6b54d" }, + "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, "nvim-sops": { "branch": "main", "commit": "cb2209562d00ef8c6c88bdec836d9edb8fbb96ef" }, "nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" }, "nvim-treesitter": { "branch": "master", "commit": "00f128dd73086aa578dc3d9142de06c633b7c685" }, diff --git a/lua/crentist/filetype.lua b/lua/crentist/filetype.lua index 8b0803a..8512fe2 100644 --- a/lua/crentist/filetype.lua +++ b/lua/crentist/filetype.lua @@ -1,4 +1,7 @@ vim.filetype.add({ + extension = { + ["tf"] = "terraform", + }, pattern = { [".*/playbooks/.*%.ya?ml"] = "yaml.ansible", [".*/roles/.*%.ya?ml"] = "yaml.ansible", diff --git a/lua/crentist/lazy/lualine.lua b/lua/crentist/lazy/lualine.lua index 867e718..d5783a7 100644 --- a/lua/crentist/lazy/lualine.lua +++ b/lua/crentist/lazy/lualine.lua @@ -1,6 +1,9 @@ return { 'nvim-lualine/lualine.nvim', - dependencies = { 'nvim-tree/nvim-web-devicons', branch = 'master' }, + dependencies = { + { 'nvim-tree/nvim-web-devicons', branch = 'master', }, + 'SmiteshP/nvim-navic', + }, config = function() local colors = { black = '#282828', @@ -55,13 +58,9 @@ return { 'filename', path = 4, }, - function() - return require("nvim-treesitter").statusline({ - indicator_size = 70, - type_patterns = { "class", "function", "method" }, - separator = " -> ", - }) - end, + { + 'navic', + }, } } }) diff --git a/lua/crentist/lazy/navic.lua b/lua/crentist/lazy/navic.lua new file mode 100644 index 0000000..39710fa --- /dev/null +++ b/lua/crentist/lazy/navic.lua @@ -0,0 +1,15 @@ +return { + 'SmiteshP/nvim-navic', + dependencies = { + 'neovim/nvim-lspconfig' + }, + config = function () + local navic = require('nvim-navic') + navic.setup({ + lsp = { + auto_attach = true + } + }) + end +} +