aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.lua66
1 files changed, 35 insertions, 31 deletions
diff --git a/init.lua b/init.lua
index ce9d584..7f7887f 100644
--- a/init.lua
+++ b/init.lua
@@ -14,6 +14,8 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
14end 14end
15vim.opt.rtp:prepend(lazypath) 15vim.opt.rtp:prepend(lazypath)
16require("lazy").setup({ 16require("lazy").setup({
17 'junegunn/fzf',
18 'junegunn/fzf.vim',
17 'nvim-tree/nvim-web-devicons', 19 'nvim-tree/nvim-web-devicons',
18 'lewis6991/gitsigns.nvim', 20 'lewis6991/gitsigns.nvim',
19 'folke/neodev.nvim', 21 'folke/neodev.nvim',
@@ -28,7 +30,8 @@ require("lazy").setup({
28 'L3MON4D3/LuaSnip', 30 'L3MON4D3/LuaSnip',
29 'saadparwaiz1/cmp_luasnip', 31 'saadparwaiz1/cmp_luasnip',
30 'RRethy/base16-nvim', 32 'RRethy/base16-nvim',
31 'nvim-treesitter/nvim-treesitter', 33 -- treesitter is experimental and breaks indentation on xml, html with `=`
34 -- 'nvim-treesitter/nvim-treesitter',
32 'nvim-lua/popup.nvim', 35 'nvim-lua/popup.nvim',
33 'nvim-lua/plenary.nvim', 36 'nvim-lua/plenary.nvim',
34 'nvim-telescope/telescope.nvim', 37 'nvim-telescope/telescope.nvim',
@@ -93,36 +96,36 @@ end
93-------------------------------------------------------------------------------- 96--------------------------------------------------------------------------------
94-- plugin setup and options 97-- plugin setup and options
95-------------------------------------------------------------------------------- 98--------------------------------------------------------------------------------
96require'nvim-treesitter.configs'.setup { 99-- require'nvim-treesitter.configs'.setup {
97 -- A list of parser names, or "all" (the five listed parsers should always be installed) 100-- -- A list of parser names, or "all" (the five listed parsers should always be installed)
98 ensure_installed = { "c", "lua", "vim", "vimdoc", "query" }, 101-- ensure_installed = { "c", "lua", "vim", "vimdoc", "query" },
99 modules = {}, 102-- modules = {},
100 -- Install parsers synchronously (only applied to `ensure_installed`) 103-- -- Install parsers synchronously (only applied to `ensure_installed`)
101 sync_install = false, 104-- sync_install = false,
102 -- Automatically install missing parsers when entering buffer 105-- -- Automatically install missing parsers when entering buffer
103 -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally 106-- -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
104 auto_install = true, 107-- auto_install = true,
105 ignore_install = { "javascript" }, 108-- ignore_install = { "javascript" },
106 highlight = { 109-- highlight = {
107 enable = true, 110-- enable = true,
108 -- NOTE: these are the names of the parsers and not the filetype. (for example if you want to 111-- -- NOTE: these are the names of the parsers and not the filetype. (for example if you want to
109 -- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is 112-- -- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is
110 -- the name of the parser) 113-- -- the name of the parser)
111 -- list of language that will be disabled 114-- -- list of language that will be disabled
112 disable = function(_, buf) 115-- disable = function(_, buf)
113 local max_filesize = 100 * 1024 -- 100 KB 116-- local max_filesize = 100 * 1024 -- 100 KB
114 local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) 117-- local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
115 if ok and stats and stats.size > max_filesize then 118-- if ok and stats and stats.size > max_filesize then
116 return true 119-- return true
117 end 120-- end
118 end, 121-- end,
119 -- Setting this to true will run `:h syntax` and tree-sitter at the same time. 122-- -- Setting this to true will run `:h syntax` and tree-sitter at the same time.
120 -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). 123-- -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
121 -- Using this option may slow down your editor, and you may see some duplicate highlights. 124-- -- Using this option may slow down your editor, and you may see some duplicate highlights.
122 -- Instead of true it can also be a list of languages 125-- -- Instead of true it can also be a list of languages
123 additional_vim_regex_highlighting = false, 126-- additional_vim_regex_highlighting = false,
124 }, 127-- },
125} 128-- }
126 129
127-- vim.wo.foldtext = 'v:lua.vim.treesitter.foldtext()' -- not available yet in my installation 130-- vim.wo.foldtext = 'v:lua.vim.treesitter.foldtext()' -- not available yet in my installation
128vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()' 131vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
@@ -217,6 +220,7 @@ local capabilities = require('cmp_nvim_lsp').default_capabilities()
217-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md 220-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
218 221
219-- C/C++ | clang 222-- C/C++ | clang
223require('lspconfig')['bitbake_language_server'].setup{capabilities = capabilities}
220require('lspconfig')['clangd'].setup{capabilities = capabilities} 224require('lspconfig')['clangd'].setup{capabilities = capabilities}
221-- lua (but not init.lua entirely, hence why neodev) 225-- lua (but not init.lua entirely, hence why neodev)
222require('lspconfig')['lua_ls'].setup { capabilities = capabilities } 226require('lspconfig')['lua_ls'].setup { capabilities = capabilities }
..