ThePrimeagen / refactoring.nvim

The Refactoring library based off the Refactoring book by Martin Fowler
MIT License
2.83k stars 79 forks source link

Add line numbers in debug log #480

Open sohanemon opened 2 months ago

sohanemon commented 2 months ago

I would like to see support for adding console.log statements with line numbers for better debugging and logging purposes.

      print_var_statements = {
        typescript = {
          'console.log("⚡ %s", %s);'
        },
        typescriptreact = {
          'console.log("⚡ %s", %s);'
        },
      },

For adding line I prefer to have something like

      print_var_statements = {
        typescript = {
          'console.log("⚡ %s %d", %s);'
        },
        typescriptreact = {
          'console.log("⚡ %s %d", %s);'
        },
      },

Thank you

TheLeoP commented 2 months ago

A PR adding this feature as an opt-in for users would be welcomed