neovim

un IDE open source

2. Neovim c'est mieux

1. PhpStorm c'est nul

3. Conclusion

@florianm__
@matarld

/sommaire

@florianm__
@matarld
if (isset($_POST["x"])) {
    exec("killall -s 15 vim");
    exec("killall -9 vim;reset");
    echo "<span id='x'>Done!</span>";
    
    return;
}

echo "<form action='#' method='POST'>
  <button type='submit' name='x' id='x'>
    KILL
  </button>
</form>";
$ php -S 0.0.0.0:1234&disown
$ firefox --new-window 0.0.0.0:1234&disown

Étape 1

Étape 2

/quitter VIM

@florianm__
@matarld

/VIM

Normal - Visual - Edition
@florianm__
@matarld

/VIM

ZZ - ZQ - :q - :x
@florianm__
@matarld

/VIM

@florianm__
@matarld

/vim

DEMO TIME!

@florianm__
@matarld

/phpstorm

Mathias Arlaud

@matarld
mtarld
les-tilleuls.coop

Florian Merle

@florianm__
Florian-Merle
AKAWAKA
@florianm__
@matarld

/bonjour

@florianm__
@matarld

/comment on fait?

nvchad

@florianm__
@matarld

/nvchad

-- ~/.config/nvim/lua/custom/plugins.lua

return {
  ["anuvyklack/windows.nvim"] = {
    cmd = { "WindowsMaximize" },
    config = function()
      -- ...
    end
  },
}
-- ~/.config/nvim/lua/custom/mappings.lua

return {
  ide = {
    n = {
      ["<leader>wm"] = {
        function()
          vim.cmd("WindowsMaximize")
        end,
        "maximize current windows",
      },
    },
  },
}

Et en gros, c'est tout.

@florianm__
@matarld

/nvchad & php-cs-fixer

php-cs-fixer

@florianm__
@matarld
-- ~/.config/nvim/lua/custom/plugins/php-cs-fixer.lua

local M = {}

local function find_config_path()
  -- will search in project dir, project tools dir and default config
end

M.format = function()
  local config_path = find_config_path()
  local buffer = get_root_path() .. "/" .. vim.fn.expand("%") 
  local command = "php-cs-fixer fix " .. buffer .. " --quiet --config=" .. config_path

  vim.cmd("silent! !" .. command)
  vim.cmd("silent! e")
end

return M

/nvchad & php-cs-fixer

@florianm__
@matarld
-- ~/.config/nvim/lua/custom/mappings.lua

return {
  php = {
    n = {
      ["<leader>fm"] = {
        function()
          require("custom.plugins.php-cs-fixer").format()
        end,
        "format file",
      },
    },
  },
}

/nvchad & php-cs-fixer

@florianm__
@matarld

/nvchad & phpactor

Phpactor

@florianm__
@matarld

/nvchad & phpactor

https://langserver.org/

@florianm__
@matarld
-- ~/.config/nvim/lua/custom/plugins/lspconfig.lua

local attach = require("plugins.configs.lspconfig").on_attach
local capabilities = require("plugins.configs.lspconfig").capabilities
local lspconfig = require "lspconfig"

lspconfig.phpactor.setup {
  on_attach = attach,
  capabilities = capabilities,
  flags = {
    debounce_text_changes = 150,
  },
}

/nvchad & phpactor

@florianm__
@matarld

/nvchad, nvim-tree & telescope

nvim-tree

telescope

@florianm__
@matarld

/nvchad & git

@florianm__
@matarld

/nvchad vs phpstorm

@florianm__
@matarld

/nvchad - aller plus loin

empty_array_as_object => foo_array_as_object
EMPTY_ARRAY_AS_OBJECT => FOO_ARRAY_AS_OBJECT
Empty_array_as_object => Foo_array_as_object
@florianm__
@matarld
-- ~/.config/nvim/lua/custom/mappings.lua

return {
  M.git = {
    n = {
      ["<leader>gc"] = {
        function()
          vim.ui.input(
            { prompt = 'Compare with (master): ' },
            function(input)
              local branch = input or "master"
              vim.cmd("Gvsplit " .. branch .. ":%")
            end)
        end,
        "compare with",
      },
    },
  },
}

/nvchad - aller plus loin

@florianm__
@matarld

/PDE

La "PDE philosophy"

@florianm__
@matarld

/PDE - tmux

@florianm__
@matarld

/PDE - i3

@florianm__
@matarld

/PDE - i3 & regolith

regolith linux

@florianm__
@matarld

/et maintenant?

2. ideavim / vscodevim

1. vimtutor

3. nvchad

4.

@florianm__
@matarld

Merci!

@florianm__
@matarld

/PDE - tmux

Copy of [JDLL] Neovim

By Florian David Merle

Copy of [JDLL] Neovim

  • 64