~kmdodrill/dotfiles

b97df5fbffb0231a85507d0b69d70b7c59304a39 — Kenneth Dodrill a month ago 07e0c96
Update neovim with 0.10.0 changes
M .config/nvim/lazy-lock.json => .config/nvim/lazy-lock.json +15 -17
@@ 1,28 1,26 @@
{
  "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
  "catppuccin": { "branch": "main", "commit": "a1439ad7c584efb3d0ce14ccb835967f030450fe" },
  "catppuccin": { "branch": "main", "commit": "d97387aea8264f484bb5d5e74f2182a06c83e0d8" },
  "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
  "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
  "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
  "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
  "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
  "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
  "commentary": { "branch": "master", "commit": "c4b8f52cbb7142ec239494e5a2c4a512f92c4d07" },
  "dadbod": { "branch": "master", "commit": "37523ffe0849b51db07fa7f48430c2aca5420a0e" },
  "dadbod": { "branch": "master", "commit": "fb30422b7bee7e2fa4205a4d226f01477f4fc593" },
  "dispatch": { "branch": "master", "commit": "4c695bc052cad2ae6b980aebbe48d046466e27ae" },
  "dotenv": { "branch": "master", "commit": "5c51cfcf8d87280d6414e03cd6b253eb70ecb800" },
  "fugitive": { "branch": "master", "commit": "ce882460cf3db12e99f8bf579cbf99e331f6dd4f" },
  "gitsigns.nvim": { "branch": "main", "commit": "9cafac31a091267838e1e90fd6e083d37611f516" },
  "lazy.nvim": { "branch": "main", "commit": "3f13f080434ac942b150679223d54f5ca91e0d52" },
  "neoscroll.nvim": { "branch": "master", "commit": "e78657719485c5663b88e5d96ffcfb6a2fe3eec0" },
  "nvim-autopairs": { "branch": "master", "commit": "4f41e5940bc0443fdbe5f995e2a596847215cd2a" },
  "nvim-cmp": { "branch": "main", "commit": "8f3c541407e691af6163e2447f3af1bd6e17f9a3" },
  "fugitive": { "branch": "master", "commit": "4f59455d2388e113bd510e85b310d15b9228ca0d" },
  "gitsigns.nvim": { "branch": "main", "commit": "d6a3bf0b36b7e0f09e39f738f9f87ab1e3c450dc" },
  "lazy.nvim": { "branch": "main", "commit": "8f19915175395680808de529e4220da8dafc0759" },
  "nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" },
  "nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
  "nvim-fzf": { "branch": "master", "commit": "c89b15aee136eeb4649901552da37a404415c356" },
  "nvim-lspconfig": { "branch": "master", "commit": "aa5f4f4ee10b2688fb37fa46215672441d5cd5d9" },
  "nvim-treesitter": { "branch": "master", "commit": "440f177277e6049d665382a94ce1af602900b5c7" },
  "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
  "oil.nvim": { "branch": "master", "commit": "bcfc0a2e01def5019aa14fac2fc6de20dedb6d3d" },
  "php-enhanced-treesitter.nvim": { "branch": "develop", "commit": "44f73a48468f6e980c08b9cacb92ed035d669ef9" },
  "nvim-lspconfig": { "branch": "master", "commit": "eadcee1573ca9d0e0cd36a49f620186a8dfdc607" },
  "nvim-treesitter": { "branch": "master", "commit": "30de5e7e9486fb1b1b8c2a1e71052b13f94f1cb0" },
  "nvim-ts-autotag": { "branch": "main", "commit": "62db4b3054ec6847e5cb189b4dea452ce0c7ad7f" },
  "oil.nvim": { "branch": "master", "commit": "259b1fbc84734bfb74225b2c2f408dd7ed9cf474" },
  "stay-in-place.nvim": { "branch": "main", "commit": "0628b6db8970fc731abf9608d6f80659b58932c9" },
  "surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
  "vim-dadbod-completion": { "branch": "master", "commit": "c920cb0ba3dff4b1b0ed373e1c0b3007dec696c2" },
  "vim-dadbod-ui": { "branch": "master", "commit": "5835df6497cc0e79cb149518d01f4f5c86dc546f" }
  "vim-dadbod-completion": { "branch": "master", "commit": "5d5ad196fcde223509d7dabbade0148f7884c5e3" },
  "vim-dadbod-ui": { "branch": "master", "commit": "5aa854ee6017e9a3463d3dc8eee5aac93739f021" }
}
\ No newline at end of file

M .config/nvim/lua/keymaps.lua => .config/nvim/lua/keymaps.lua +0 -8
@@ 8,13 8,5 @@ map('', '<C-j>', '<C-w>j')
map('', '<C-k>', '<C-w>k')
map('', '<C-l>', '<C-w>l')

-- visual mode indention
map('v', '<', '<gv')
map('v', '>', '>gv')

-- better page up / down
map('n', '<C-u>', '<C-u>zz')
map('n', '<C-d>', '<C-d>zz')

-- source / edit config
map('n', '<leader>ve', ':edit $MYVIMRC<CR>')

M .config/nvim/lua/options.lua => .config/nvim/lua/options.lua +1 -2
@@ 2,9 2,8 @@ local o = vim.opt
local g = vim.g

-- aesthetic
o.termguicolors = true
o.wrap = false
o.scrolloff = 8
o.scrolloff = 3
o.sidescroll = 3
g.loaded_netrwPlugin = 0


M .config/nvim/lua/plugins/init.lua => .config/nvim/lua/plugins/init.lua +5 -6
@@ 10,7 10,6 @@ return {
    end,
  },
  { url = "https://tpope.io/vim/surround.git" },
  { url = "https://tpope.io/vim/commentary.git" },
  {
    url = "https://tpope.io/vim/dispatch.git",
    lazy = false,


@@ 20,9 19,9 @@ return {
    },
  },
  {
    "karb94/neoscroll.nvim",
    config = function ()
      require('neoscroll').setup {}
    end,
  },
    "gbprod/stay-in-place.nvim",
    config = function()
      require('stay-in-place').setup {}
    end
  }
}

M .config/nvim/lua/plugins/lsp.lua => .config/nvim/lua/plugins/lsp.lua +31 -28
@@ 12,24 12,25 @@ return {
        capabilities = capabilities,
        on_init = function(client)
          local path = client.workspace_folders[1].name
          if not vim.loop.fs_stat(path..'/.luarc.json') and not vim.loop.fs_stat(path..'/.luarc.jsonc') then
            client.config.settings = vim.tbl_deep_extend('force', client.config.settings, {
              Lua = {
                runtime = {
                  version = 'LuaJIT',
                },
                workspace = {
                  checkThirdParty = false,
                  library = {
                    vim.env.VIMRUNTIME,
                  },
                },
              }
            })
            client.notify('workspace/didChangeConfiguration', { settings = client.config.settings })
          if vim.loop.fs_stat(path..'/.luarc.json') or vim.loop.fs_stat(path..'/.luarc.jsonc') then
            return
          end
          return true
        end
          client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
            runtime = {
              version = 'LuaJIT',
            },
            workspace = {
              checkThirdParty = false,
              library = {
                vim.env.VIMRUNTIME,
              },
            },
          })
          client.notify('workspace/didChangeConfiguration', { settings = client.config.settings })
        end,
        settings = {
          Lua = {}
        }
      }
      lspconfig.jsonls.setup { capabilities = capabilities }
      lspconfig.clangd.setup { capabilities = capabilities }


@@ 47,22 48,24 @@ return {
        on_init = function(client)
          local project_path = client.workspace_folders[1].name
          local function read_file(path)
              local open = io.open
              local file = open(path, "rb") -- r read mode and b binary mode
              if not file then
                  return nil
              end
              local content = file:read("*a") -- *a or *all reads the whole file
              file:close()
              return content
            local open = io.open
            local file = open(path, "rb") -- r read mode and b binary mode
            if not file then
              return nil
            end
            local content = file:read("*a") -- *a or *all reads the whole file
            file:close()
            return content
          end

          local composer = vim.json.decode(read_file(project_path .. "/composer.json"))
          print("Configuring intelephense for php " .. composer.config.platform.php)
          client.config.settings["intelephense"].environment.phpVersion = composer.config.platform.php

          client.config.settings.intelephense = vim.tbl_deep_extend('force', client.config.settings.intelephense, {
            environment = {
              phpVersion = composer.config.platform.php,
            },
          })
          client.notify("workspace/didChangeConfiguration", { settings = client.config.settings })
          return true
        end,
        filetypes = {
          "php",

M .config/nvim/lua/plugins/treesitter.lua => .config/nvim/lua/plugins/treesitter.lua +18 -35
@@ 2,39 2,30 @@ return {
  {
    "nvim-treesitter/nvim-treesitter",
    build = ":TSUpdate",
    dependencies = {
      "windwp/nvim-ts-autotag",
    },
    config = function ()
      local configs = require("nvim-treesitter.configs")

      local disableIndentsFor = {
        'php',
        'php_only',
        'phpdoc',
        'lua',
        'c',
        'javascript',
        'typescript',
      }

      configs.setup {
        ensure_installed = {
          -- general
          'bash',
          -- common
          'lua',
          'bash',
          'comment',
          'markdown',
          'json',
          -- C
          'c',
          'yaml',
          'make',
          -- backend
          'cmake',
          'diff',
          'gitignore',
          'git_config',
          'ssh_config',
          -- gamedev
          'c',
          'glsl',
          -- work
          'php',
          'php_only',
          'phpdoc',
          'sql',
          -- frontend
          'javascript',
          'jsdoc',
          'typescript',


@@ 44,23 35,15 @@ return {
          'twig',
        },
        sync_install = false,
        indent = {
          enable = true,
          disable = disableIndentsFor,
        },
        highlight = {
          enable = true,
          additional_vim_regex_highlighting = disableIndentsFor,
        },
        autotag = {
          enable = true,
        }
        indent = { enable = true, disable = {'php'} },
        highlight = { enable = true, additional_vim_regex_highlighting = {'php'} },
      }
    end
  },
  {
    "kedodrill/php-enhanced-treesitter.nvim",
    ft = { "php", "inc" },
    branch = "develop",
    "windwp/nvim-ts-autotag",
    config = function ()
      require('nvim-ts-autotag').setup {}
    end,
  },
}

M .config/sway/config => .config/sway/config +1 -0
@@ 34,6 34,7 @@ output * bg /usr/share/backgrounds/user/sombrero-galaxy.jpg fill
#
# You can get the names of your outputs by running: swaymsg -t get_outputs
output DP-1 pos 0,0 res 2560x1440@144hz
#output HDMI-A-1 pos 0,0 res 1920x1080@60hz

### Idle configuration
#