this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

lsp setup defaults and configurability

+86 -53
+1 -30
nvim/init.lua
··· 1 + require("config.base") 1 2 require("config.lazy") 2 3 require("config.keys") 3 - 4 - ---@diagnostic disable-next-line: undefined-field 5 - vim.opt.fillchars:append({ diff = "╱" }) 6 - 7 - vim.opt.termguicolors = true 8 - vim.opt.relativenumber = true 9 - vim.opt.shiftwidth = 2 10 - vim.opt.tabstop = 2 11 - vim.opt.clipboard = "" 12 - vim.opt.wrap = false 13 - 14 - -- Reserve a space in the gutter 15 - vim.opt.signcolumn = "yes" 16 - 17 - vim.api.nvim_create_autocmd({ "FileType" }, { 18 - pattern = { "markdown", "gitlab", "avante", "" }, 19 - callback = function() 20 - vim.opt_local.wrap = true 21 - vim.opt_local.linebreak = true 22 - end, 23 - }) 24 - 25 - -- TODO: Turn this into a convenience function that you can 26 - -- enable or disable on a per-project and per-filetype basis. 27 - vim.api.nvim_create_augroup("FormatAutogroup", { clear = true }) 28 - vim.api.nvim_create_autocmd("BufWritePost", { 29 - group = "FormatAutogroup", 30 - pattern = "*", 31 - command = "FormatWrite", 32 - })
+7 -6
nvim/lazy-lock.json
··· 13 13 "gitsigns.nvim": { "branch": "main", "commit": "4daf7022f1481edf1e8fb9947df13bb07c18e89a" }, 14 14 "goyo.vim": { "branch": "master", "commit": "fa0263d456dd43f5926484d1c4c7022dfcb21ba9" }, 15 15 "img-clip.nvim": { "branch": "main", "commit": "28a32d811d69042f4fa5c3d5fa35571df2bc1623" }, 16 - "lazy.nvim": { "branch": "main", "commit": "b1134ab82ee4279e31f7ddf7e34b2a99eb9b7bc9" }, 16 + "lazy.nvim": { "branch": "main", "commit": "60cf258a9ae7fffe04bb31141141a91845158dcc" }, 17 17 "lazydev.nvim": { "branch": "main", "commit": "d5800897d9180cea800023f2429bce0a94ed6064" }, 18 + "mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" }, 18 19 "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, 19 20 "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, 20 21 "nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" }, 21 22 "nvim-comment": { "branch": "main", "commit": "e9ac16ab056695cad6461173693069ec070d2b23" }, 22 23 "nvim-config-local": { "branch": "main", "commit": "83bb6d9881653a5cf8b489ba8a6fe5a06049a10a" }, 23 - "nvim-lspconfig": { "branch": "master", "commit": "d01864641c6e43c681c3e9f6cf4745c75fdd9dcc" }, 24 - "nvim-tree.lua": { "branch": "master", "commit": "4a9e82d10a3715d0c3845e1d2f66ddfb8b711253" }, 25 - "nvim-treesitter": { "branch": "master", "commit": "425b58968340bd5b4621c2a0d626c73556516d3d" }, 24 + "nvim-lspconfig": { "branch": "master", "commit": "4cb925e96288a71409a86c84fd97f4434a95453e" }, 25 + "nvim-tree.lua": { "branch": "master", "commit": "c7639482a1598f4756798df1b2d72f79fe5bb34f" }, 26 + "nvim-treesitter": { "branch": "master", "commit": "8e40904e49bbad5812798eb54be8c00d77cdd301" }, 26 27 "nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" }, 27 28 "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, 28 - "render-markdown.nvim": { "branch": "main", "commit": "bee16b21bf47b64ceda8c9bb281d4b576d329c0f" }, 29 + "render-markdown.nvim": { "branch": "main", "commit": "d80acb3f4ccc88052f65fa0a26e46c106b328bbe" }, 29 30 "rose-pine": { "branch": "main", "commit": "07a887a7bef4aacea8c7caebaf8cbf808cdc7a8e" }, 30 31 "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, 31 - "toggleterm.nvim": { "branch": "main", "commit": "5969229c0352ff1ed7f6e24aba9c6554e1842939" }, 32 + "toggleterm.nvim": { "branch": "main", "commit": "87b2d6a3cab8e2bd9a0255427074285f0365398d" }, 32 33 "trouble.nvim": { "branch": "main", "commit": "3dc00c0447c016cd43e03054c3d49436a1f2076d" }, 33 34 "vim-prisma": { "branch": "main", "commit": "95c5b25066efb34c75bce78698baa371fe0ee7c2" }, 34 35 "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
+22
nvim/lua/config/base.lua
··· 1 + vim.opt.termguicolors = true 2 + 3 + vim.opt.relativenumber = true 4 + 5 + vim.opt.shiftwidth = 2 6 + vim.opt.tabstop = 2 7 + 8 + vim.opt.clipboard = "" 9 + 10 + -- Reserve a space in the gutter 11 + vim.opt.signcolumn = "yes" 12 + 13 + vim.opt.fillchars:append({ diff = "╱" }) 14 + 15 + vim.opt.wrap = false 16 + vim.api.nvim_create_autocmd({ "FileType" }, { 17 + pattern = { "markdown", "gitlab", "avante", "" }, 18 + callback = function() 19 + vim.opt_local.wrap = true 20 + vim.opt_local.linebreak = true 21 + end, 22 + })
+6 -6
nvim/lua/plugins/config.lua
··· 1 1 return { 2 2 "klen/nvim-config-local", 3 3 config = function() 4 - require('config-local').setup({ 4 + require("config-local").setup({ 5 5 -- Config file patterns to load (lua supported) 6 - config_files = { ".seth.nvim.lua", ".nvim.lua", ".nvimrc", ".exrc" }, 6 + config_files = { ".seth.nvim.lua", "nvim.lua", ".nvim.lua", ".nvimrc", ".exrc" }, 7 7 8 8 -- Where the plugin keeps files data 9 9 hashfile = vim.fn.stdpath("data") .. "/config-local", 10 10 11 11 autocommands_create = true, -- Create autocommands (VimEnter, DirectoryChanged) 12 - commands_create = true, -- Create commands (ConfigLocalSource, ConfigLocalEdit, ConfigLocalTrust, ConfigLocalIgnore) 13 - silent = false, -- Disable plugin messages (Config loaded/ignored) 14 - lookup_parents = false, -- Lookup config files in parent directories 12 + commands_create = true, -- Create commands (ConfigLocalSource, ConfigLocalEdit, ConfigLocalTrust, ConfigLocalIgnore) 13 + silent = false, -- Disable plugin messages (Config loaded/ignored) 14 + lookup_parents = false, -- Lookup config files in parent directories 15 15 }) 16 - end 16 + end, 17 17 }
+50 -11
nvim/lua/plugins/ide.lua
··· 3 3 "neovim/nvim-lspconfig", 4 4 dependencies = { 5 5 "williamboman/mason.nvim", 6 + "klen/nvim-config-local", 6 7 }, 7 8 config = function() 8 9 local lspc = require("lspconfig") 9 10 local lspconfig_defaults = lspc.util.default_config 10 11 lspconfig_defaults.capabilities = 11 12 vim.tbl_deep_extend("force", lspconfig_defaults.capabilities, require("cmp_nvim_lsp").default_capabilities()) 12 - 13 - lspc.lua_ls.setup({}) 14 - lspc.vtsls.setup({}) 15 - lspc.eslint.setup({}) 16 - lspc.jsonls.setup({}) 17 - lspc.bashls.setup({}) 18 - lspc.prismals.setup({}) 19 - lspc.rust_analyzer.setup({}) 20 - lspc.pylsp.setup({}) 21 - lspc.spectral.setup({}) 22 - lspc.yamlls.setup({}) 23 13 end, 24 14 }, 25 15 { ··· 50 40 }, 51 41 }, 52 42 }) 43 + 44 + -- TODO: Turn this into a convenience function that you can 45 + -- enable or disable on a per-project and per-filetype basis. 46 + vim.api.nvim_create_augroup("FormatAutogroup", { clear = true }) 47 + vim.api.nvim_create_autocmd("BufWritePost", { 48 + group = "FormatAutogroup", 49 + pattern = "*", 50 + command = "FormatWrite", 51 + }) 53 52 end, 54 53 }, 55 54 { 56 55 "williamboman/mason.nvim", 57 56 opts = {}, 57 + }, 58 + { 59 + "williamboman/mason-lspconfig.nvim", 60 + config = function() 61 + require("mason-lspconfig").setup({ 62 + ensure_installed = { 63 + "lua_ls", 64 + "jsonls", 65 + "vtsls", 66 + "denols", 67 + "eslint", 68 + "bashls", 69 + "rust_analyzer", 70 + "pylsp", 71 + "yamlls", 72 + }, 73 + }) 74 + 75 + LangServers = { 76 + denols = false, 77 + } 78 + 79 + function SetupLspHandlers() 80 + require("mason-lspconfig").setup_handlers({ 81 + function(server_name) 82 + if LangServers[server_name] == false then 83 + return 84 + end 85 + require("lspconfig")[server_name].setup(LangServers[server_name] or {}) 86 + end, 87 + }) 88 + end 89 + 90 + -- Call this after loading local configs so the `LangServers` global 91 + -- can be modified in those configs as needed first. 92 + vim.api.nvim_create_autocmd("User", { 93 + pattern = "ConfigLocalFinished", 94 + callback = SetupLspHandlers, 95 + }) 96 + end, 58 97 }, 59 98 { 60 99 "folke/lazydev.nvim",