diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 0000000..e092218 --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,22 @@ +{ + "aerial.nvim": { "branch": "master", "commit": "24ebacab5821107c50f628e8e7774f105c08fe9b" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, + "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" }, + "gruvbox": { "branch": "master", "commit": "f1ecde848f0cdba877acb0c740320568252cc482" }, + "lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" }, + "nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" }, + "nvim-lspconfig": { "branch": "master", "commit": "b3014f2209503944f2714cf27c95591433a0c7d8" }, + "nvim-treesitter": { "branch": "master", "commit": "ef267f0c285928ea3a0d3362a260a0728fd4a146" }, + "plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, + "telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" }, + "tokyonight.nvim": { "branch": "main", "commit": "9bf9ec53d5e87b025e2404069b71e7ebdc3a13e5" }, + "vim-commentary": { "branch": "master", "commit": "c4b8f52cbb7142ec239494e5a2c4a512f92c4d07" }, + "vim-fugitive": { "branch": "master", "commit": "dac8e5c2d85926df92672bf2afb4fc48656d96c7" }, + "vim-polyglot": { "branch": "master", "commit": "bc8a81d3592dab86334f27d1d43c080ebf680d42" }, + "vim-vsnip": { "branch": "master", "commit": "02a8e79295c9733434aab4e0e2b8c4b7cea9f3a9" } +} \ No newline at end of file diff --git a/lua/base/other.lua b/lua/base/other.lua index 658574b..15c75fa 100644 --- a/lua/base/other.lua +++ b/lua/base/other.lua @@ -27,8 +27,7 @@ vim.cmd [[autocmd BufEnter * set fo-=c fo-=r fo-=o]] opt.encoding = "utf-8" opt.fileencoding = "utf-8" -opt.fileformats = "unix" -opt.fileformat = "unix" +opt.ff = "unix" -- Also work under ru opt.langmap = "ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKLMNOPQRSTUVWXYZ,фисвуапршолдьтщзйкыегмцчня;abcdefghijklmnopqrstuvwxyz" @@ -36,29 +35,3 @@ opt.langmap = "ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKL opt.colorcolumn = "120" opt.mouse = "" - -vim.filetype.add({ - extension = { - vp = 'glsl', - fp = 'glsl', - gp = 'glsl', - vs = 'glsl', - fs = 'glsl', - gs = 'glsl', - tcs = 'glsl', - tes = 'glsl', - cs = 'glsl', - vert = 'glsl', - frag = 'glsl', - geom = 'glsl', - tess = 'glsl', - shd = 'glsl', - gls = 'glsl', - glsl = 'glsl', - rgen = 'glsl', - comp = 'glsl', - rchit = 'glsl', - rahit = 'glsl', - rmiss = 'glsl', - } -}) diff --git a/lua/plugins/lazy.lua b/lua/plugins/lazy.lua index 44a6d78..1a3de84 100644 --- a/lua/plugins/lazy.lua +++ b/lua/plugins/lazy.lua @@ -15,21 +15,30 @@ vim.opt.rtp:prepend(lazypath) require('lazy').setup({ { 'tpope/vim-commentary', }, { 'tpope/vim-fugitive', }, + { 'sheerun/vim-polyglot', + init = function() + -- vim-polyglot confusingly registers *.comp both for perl and for glsl + vim.api.nvim_set_var('polyglot_disabled', {'perl'}) + end, + }, { 'morhetz/gruvbox', lazy = false, priority = 1000, config = function() - vim.opt.termguicolors = false vim.opt.background = 'dark' - vim.g.gruvbox_italic = true + vim.g.gruvbox_italic = 1 vim.cmd([[colorscheme gruvbox]]) end, }, - -- { - -- "folke/tokyonight.nvim", - -- lazy = true - -- }, + { + "folke/tokyonight.nvim", + lazy = true, + -- config = function() + -- -- load the colorscheme here + -- vim.cmd([[colorscheme tokyonight]]) + -- end, + }, { 'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }, @@ -40,16 +49,20 @@ require('lazy').setup({ local telescope = require('telescope') telescope.setup{ + -- defaults = { + -- } extensions = { fzf = { fuzzy = true, -- false will only do exact matching override_generic_sorter = true, -- override the generic sorter override_file_sorter = true, -- override the file sorter case_mode = "smart_case", -- or "ignore_case" or "respect_case" - -- the default case_mode is "smart_case" + -- the default case_mode is "smart_case" } } } + + --telescope.load_extension('fzy') telescope.load_extension('fzf') local builtin = require('telescope.builtin') @@ -64,7 +77,7 @@ require('lazy').setup({ build = ":TSUpdate", config = function() require("nvim-treesitter.configs").setup { - ensure_installed = { 'c', 'cpp', 'lua' }, + ensure_installed = { "c", "cpp", "pascal", "lua", "glsl", "yaml" }, highlight = { enable = true, } } end @@ -72,24 +85,11 @@ require('lazy').setup({ { 'neovim/nvim-lspconfig', config = function() - -- Setup language servers - -- Server-specific settings. See `:help lspconfig-all` - vim.lsp.config('*', { - capabilities = { - textDocument = { - semanticTokens = { - multilineTokenSupport = true, - } - } - }, - root_markers = { '.git' }, - }) - vim.lsp.config('clangd', { - cmd = { 'clangd', '--background-index', '--clang-tidy', '--log=verbose', '--header-insertion=never' }, - filetypes = { 'c', 'cpp' } - }) + -- Setup language servers. + local lspconfig = require('lspconfig') + --lspconfig.clangd.setup {} + --lspconfig.neocmake.setup {} - vim.lsp.enable('clangd') -- Global mappings. -- See `:help vim.diagnostic.*` for documentation on any of the below functions vim.keymap.set('n', 'e', vim.diagnostic.open_float) @@ -210,6 +210,13 @@ require('lazy').setup({ { name = 'cmdline' } }) }) + + -- Set up lspconfig. + local capabilities = require('cmp_nvim_lsp').default_capabilities() + -- TODO Replace with each lsp server you've enabled. + --[[require('lspconfig')['clangd'].setup { + capabilities = capabilities + }--]] end, }, { @@ -230,3 +237,28 @@ require('lazy').setup({ } }) +vim.filetype.add({ + extension = { + vp = 'glsl', + fp = 'glsl', + gp = 'glsl', + vs = 'glsl', + fs = 'glsl', + gs = 'glsl', + tcs = 'glsl', + tes = 'glsl', + cs = 'glsl', + vert = 'glsl', + frag = 'glsl', + geom = 'glsl', + tess = 'glsl', + shd = 'glsl', + gls = 'glsl', + glsl = 'glsl', + rgen = 'glsl', + comp = 'glsl', + rchit = 'glsl', + rahit = 'glsl', + rmiss = 'glsl', + } +})